Skip to content

Commit 826152c

Browse files
fixed conditionals for platform detection
1 parent ea29307 commit 826152c

1 file changed

Lines changed: 15 additions & 7 deletions

File tree

setup.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,22 @@ def run(self):
8181
'src/ice/src/ice_library.cpp'
8282
]
8383

84+
# gcc and clang arguments
85+
gcc_compile_args = [
86+
'-fpermissive',
87+
'-Wno-unused-variable',
88+
'-Wno-unused-function',
89+
'-Wno-write-strings',
90+
]
91+
8492
# Set compiler flags here
85-
if 'LINUX' in platform.system().upper() or "MSC" not in sys.version:
86-
compile_args = [
87-
'-fpermissive',
88-
'-Wno-unused-variable',
89-
'-Wno-unused-function',
90-
'-Wno-write-strings',
91-
]
93+
if 'WINDOWS' in platform.system().upper():
94+
compile_args = []
95+
# mingw and clang python builds won't have MSC in the version string
96+
if "MSC" not in sys.version:
97+
compile_args = gcc_compile_args
98+
elif 'LINUX' in platform.system().upper():
99+
compile_args = gcc_compile_args
92100
elif 'DARWIN' in platform.system().upper():
93101
# Mac doesn't respect the compiler args, but will append with ARCHFLAGS environment variable
94102
os.environ['ARCHFLAGS'] = '-std=c++17'

0 commit comments

Comments
 (0)