Skip to content

Commit

Permalink
Merge pull request #37 from cmccully/cflags
Browse files Browse the repository at this point in the history
Default to CFLAGS environment variable for setup if it exists.
  • Loading branch information
cmccully committed Mar 23, 2018
2 parents 45521b3 + 5d7c7c3 commit 3ed58dd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions astroscrappy/utils/setup_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,22 @@ def get_extensions():
include_dirs = ['numpy', UTIL_DIR]

libraries = []

if 'CFLAGS' in os.environ:
extra_compile_args = os.environ['CFLAGS'].split()
else:
extra_compile_args = ['-g', '-O3', '-funroll-loops','-ffast-math']
ext_med = Extension(name=str('astroscrappy.utils.median_utils'),
sources=med_sources,
include_dirs=include_dirs,
libraries=libraries,
language="c",
extra_compile_args=['-g', '-O3', '-funroll-loops',
'-ffast-math'])
extra_compile_args=extra_compile_args)
ext_im = Extension(name=str("astroscrappy.utils.image_utils"),
sources=im_sources,
include_dirs=include_dirs,
libraries=libraries,
language="c",
extra_compile_args=['-g', '-O3', '-funroll-loops',
'-ffast-math'])
extra_compile_args=extra_compile_args)

has_openmp, outputs = check_openmp()
if has_openmp:
Expand Down

0 comments on commit 3ed58dd

Please sign in to comment.