Skip to content

Commit

Permalink
Specify c++14 only for c++, not c
Browse files Browse the repository at this point in the history
  • Loading branch information
Zack Singer committed Aug 15, 2024
1 parent b7c4995 commit ae29e16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# Determine which compiler is being used to build the C/C++ modules
compiler_type = distutils.ccompiler.get_default_compiler()
if compiler_type in ("unix", "mingw32"):
compiler_flags = ['-O3', '-ftree-vectorize', '-Wall', '-funroll-loops', '--std=c++14']
compiler_flags = ['-O3', '-ftree-vectorize', '-Wall', '-funroll-loops']
if not sys.platform.startswith('win'):
compiler_flags.append('-fPIC')
elif compiler_type == "msvc":
Expand Down Expand Up @@ -123,7 +123,7 @@ def get_cpp_extensions():
inverse_distortion_ext = Extension(
name='hexrd.extensions.inverse_distortion',
sources=src_files,
extra_compile_args=compiler_flags,
extra_compile_args=compiler_flags+['-std=c++14'],
include_dirs=include_dirs,
language='c++',
)
Expand All @@ -138,7 +138,7 @@ def get_old_xfcapi_extension_modules():
'hexrd.extensions._transforms_CAPI',
sources=srclist,
include_dirs=[np_include_dir],
extra_compile_args=compiler_flags,
extra_compile_args=compiler_flags+['-std=c++14'],
)

return [transforms_mod]
Expand Down

0 comments on commit ae29e16

Please sign in to comment.