Skip to content

Commit e09a1fa

Browse files
committed
Debugging non-failure of /std:c++17
1 parent f995cfc commit e09a1fa

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.appveyor.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ platform:
1212
environment:
1313
matrix:
1414
- PYTHON: 36
15-
CPP: 14
15+
CPP: 17
1616
CONFIG: Debug
1717
- PYTHON: 27
18-
CPP: 14
18+
CPP: 17
1919
CONFIG: Debug
2020
- CONDA: 36
2121
CPP: 17
@@ -57,14 +57,15 @@ install:
5757
7z x 3.3.3.zip -y > $null
5858
$env:CMAKE_INCLUDE_PATH = "eigen-eigen-67e894c6cd8f;$env:CMAKE_INCLUDE_PATH"
5959
build_script:
60+
- set VERBOSE=1
61+
- cmake --version
6062
- cmake -G "%CMAKE_GENERATOR%" -A "%CMAKE_ARCH%"
61-
-DPYBIND11_CPP_STANDARD="/std:c++%CPP%"
63+
-DPYBIND11_CPP_STANDARD="/std:c++17"
6264
-DPYBIND11_WERROR=ON
6365
-DDOWNLOAD_CATCH=ON
64-
-DCMAKE_SUPPRESS_REGENERATION=1
6566
.
6667
- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
67-
- cmake --build . --config %CONFIG% --target pytest -- /m /v:m /logger:%MSBuildLogger%
68-
- cmake --build . --config %CONFIG% --target cpptest -- /m /v:m /logger:%MSBuildLogger%
69-
- if "%CPP%"=="17" (cmake --build . --config %CONFIG% --target test_cmake_build -- /m /v:m /logger:%MSBuildLogger%)
68+
- cmake --build . --config %CONFIG% --target pytest -- /m /logger:%MSBuildLogger%
69+
- cmake --build . --config %CONFIG% --target cpptest -- /m /logger:%MSBuildLogger%
70+
- if "%CPP%"=="17" (cmake --build . --config %CONFIG% --target test_cmake_build -- /m /logger:%MSBuildLogger%)
7071
on_failure: if exist "tests\test_cmake_build" type tests\test_cmake_build\*.log*

tools/pybind11Tools.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ if(NOT PYBIND11_CPP_STANDARD AND NOT CMAKE_CXX_STANDARD)
5656
"C++ standard flag, e.g. -std=c++11, -std=c++14, /std:c++14. Defaults to C++14 mode." FORCE)
5757
endif()
5858

59+
message(PYBIND11_CPP_STANDARD = ${PYBIND11_CPP_STANDARD})
60+
5961
# Checks whether the given CXX/linker flags can compile and link a cxx file. cxxflags and
6062
# linkerflags are lists of flags to use. The result variable is a unique variable name for each set
6163
# of flags: the compilation result will be cached base on the result variable. If the flags work,
@@ -218,8 +220,10 @@ function(pybind11_add_module target_name)
218220
# Make sure C++11/14 are enabled
219221
if(PYBIND11_CPP_STANDARD)
220222
if(CMAKE_VERSION VERSION_LESS 3.3 OR CMAKE_GENERATOR MATCHES "Visual Studio")
223+
message("HERE, I hope?")
221224
target_compile_options(${target_name} PUBLIC ${PYBIND11_CPP_STANDARD})
222225
else()
226+
message("NOT HERE, I hope?")
223227
target_compile_options(${target_name} PUBLIC $<$<COMPILE_LANGUAGE:CXX>:${PYBIND11_CPP_STANDARD}>)
224228
endif()
225229
endif()

0 commit comments

Comments
 (0)