From ae29e1623c002e4292bc6604caa83b0076f74354 Mon Sep 17 00:00:00 2001 From: Zack Singer Date: Thu, 15 Aug 2024 13:22:45 -0400 Subject: [PATCH] Specify c++14 only for c++, not c --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 1211b16f..18507315 100644 --- a/setup.py +++ b/setup.py @@ -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": @@ -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++', ) @@ -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]