Add -std=gnu99 to make for loop int declarations valid and to ensure that M_PI is defined (thanks to David Alonso)
@@ -105,11 +105,13 @@ _ccllib = Extension(
],
libraries = ['m', 'gsl', 'gslcblas', 'gomp'],
include_dirs = [numpy_include, "include/", "class/include"],
- extra_compile_args=['-O4', '-fopenmp',
+ extra_compile_args=['-O4', '-fopenmp', '-std=gnu99',
'-D__CLASSDIR__="%s"' % CLASS_DATA_DIR],
#extra_compile_args=['-g', '-O0', '-Q',], # For debugging
swig_opts=['-threads'],
)
+ # N.B. Needs -std=gnu99 to allow for loop initial declarations *and*
+ # for M_PI to be defined in math.h (it's not deined in C99)
# CCL setup script
setup( name = "pyccl",
