Skip to content

Commit

Permalink
gh-127906: Backport test_cppext changes from main
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Dec 13, 2024
1 parent 8384279 commit 48660d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Lib/test/test_cppext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def run_cmd(operation, cmd):
cmd = [python_exe, '-X', 'dev',
'-m', 'pip', 'install', '--no-build-isolation',
os.path.abspath(pkg_dir)]
if support.verbose:
cmd.append('-v')
run_cmd('Install', cmd)

# Do a reference run. Until we test that running python
Expand Down
10 changes: 8 additions & 2 deletions Lib/test/test_cppext/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@


SOURCE = 'extension.cpp'

if not support.MS_WINDOWS:
# C++ compiler flags for GCC and clang
CPPFLAGS = [
Expand All @@ -19,8 +20,13 @@
'-Werror',
]
else:
# Don't pass any compiler flag to MSVC
CPPFLAGS = []
# MSVC compiler flags
CPPFLAGS = [
# Display warnings level 1 to 4
'/W4',
# Treat all compiler warnings as compiler errors
'/WX',
]


def main():
Expand Down

0 comments on commit 48660d5

Please sign in to comment.