Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Dedupe some C++ templates #17497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ def build_extensions(self):
env = self.add_optimization_flags()
for package in good_packages:
package.do_custom_build(env)
# Make sure we don't accidentally use too modern C++ constructs, even
# though modern compilers default to enabling them. Enabling this for
# a single platform is enough; also only do this for C++-only
# extensions as clang refuses to compile C/ObjC with -std=c++11.
if sys.platform != "win32":
for ext in self.distribution.ext_modules[:]:
if not any(src.endswith((".c", ".m")) for src in ext.sources):
ext.extra_compile_args.append("-std=c++11")
return super().build_extensions()

def build_extension(self, ext):
Expand Down
Loading