1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

Tests: Fix ConfigSources test with Intel compiler on Windows

The test regularly fails updating the `vc*.pdb` compiler-generated
PDB file.  Add the `/Z7` flag as the compiler suggests for this.
This commit is contained in:
Brad King
2021-01-06 11:13:03 -05:00
parent 91f0f4aa73
commit 0dcc03cd16

View File

@@ -5,6 +5,11 @@ if(NOT _isMultiConfig AND NOT CMAKE_BUILD_TYPE)
endif()
project(ConfigSources CXX)
if("${CMAKE_CXX_COMPILER_ID};${CMAKE_CXX_SIMULATE_ID}" STREQUAL "Intel;MSVC")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -Z7")
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -Z7")
endif()
# Source file(s) named with the configuration(s).
file(GENERATE
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/config_$<CONFIG>.cpp"