Skip to content

Commit 4fedd09

Browse files
authored
Update setup.py
1 parent e696587 commit 4fedd09

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,23 @@ def _parse_csv_env(name, default_value):
2626
if sys.platform == "win32":
2727
extra_compile_args.extend(["/O2"])
2828
else:
29-
extra_compile_args.extend(["-O3", "-std=c++11"])
29+
extra_compile_args.extend(["-O3"])
3030

3131
extra_compile_args.extend(_parse_csv_env("EASYSBA_EXTRA_COMPILE_ARGS", ""))
3232

33+
# C++ specific flags - setuptools will apply these only to C++ files
34+
extra_cxx_compile_args = extra_compile_args.copy()
35+
if sys.platform != "win32":
36+
extra_cxx_compile_args.append("-std=c++11")
37+
3338
ext_modules = [
3439
Extension(
3540
"easysba._easysba",
3641
sources=sources,
3742
include_dirs=[pybind11.get_include(), "src"],
3843
language="c++",
3944
libraries=libraries,
40-
extra_compile_args=extra_compile_args,
45+
extra_compile_args=extra_cxx_compile_args,
4146
)
4247
]
4348

0 commit comments

Comments
 (0)