Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1de25cb + 9644a9c commit e528649Copy full SHA for e528649
setup.py
@@ -181,6 +181,14 @@ def build_extensions(self):
181
env = self.add_optimization_flags()
182
for package in good_packages:
183
package.do_custom_build(env)
184
+ # Make sure we don't accidentally use too modern C++ constructs, even
185
+ # though modern compilers default to enabling them. Enabling this for
186
+ # a single platform is enough; also only do this for C++-only
187
+ # extensions as clang refuses to compile C/ObjC with -std=c++11.
188
+ if sys.platform != "win32":
189
+ for ext in self.distribution.ext_modules[:]:
190
+ if not any(src.endswith((".c", ".m")) for src in ext.sources):
191
+ ext.extra_compile_args.append("-std=c++11")
192
return super().build_extensions()
193
194
def build_extension(self, ext):
0 commit comments