Skip to content

Commit

Permalink
Merge pull request #290 from Biswa96/setup-fix-mingw
Browse files Browse the repository at this point in the history
setup: Add MSVC options only when python is compiled with MSVC
  • Loading branch information
jamadden committed Mar 24, 2022
2 parents df6d0ee + 9826438 commit 7e815da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
if sys.platform == 'darwin':
# The clang compiler doesn't use --std=c++11 by default
cpp_compile_args.append("--std=gnu++11")
elif sys.platform == 'win32':
elif sys.platform == 'win32' and "MSC" in platform.python_compiler():
# Older versions of MSVC (Python 2.7) don't handle C++ exceptions
# correctly by default. While newer versions do handle exceptions by default,
# they don't do it fully correctly. So we need an argument on all versions.
Expand Down

0 comments on commit 7e815da

Please sign in to comment.