summaryrefslogtreecommitdiffstats
path: root/Tests/ConfigSources
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-06 16:13:03 (GMT)
committerBrad King <brad.king@kitware.com>2021-01-06 16:13:03 (GMT)
commit0dcc03cd162d4c93c66ea8eaf3067702e7b1f461 (patch)
treebdcd9ea84a0ef4d4c0e3a5b35137c545a3258b62 /Tests/ConfigSources
parent91f0f4aa73a78b00af9cdeb6fb7a5a4236fbad80 (diff)
downloadCMake-0dcc03cd162d4c93c66ea8eaf3067702e7b1f461.zip
CMake-0dcc03cd162d4c93c66ea8eaf3067702e7b1f461.tar.gz
CMake-0dcc03cd162d4c93c66ea8eaf3067702e7b1f461.tar.bz2
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.
Diffstat (limited to 'Tests/ConfigSources')
-rw-r--r--Tests/ConfigSources/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/ConfigSources/CMakeLists.txt b/Tests/ConfigSources/CMakeLists.txt
index ab0b5d8..a3d98f6 100644
--- a/Tests/ConfigSources/CMakeLists.txt
+++ b/Tests/ConfigSources/CMakeLists.txt
@@ -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"