summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-06 11:13:03 -0500
committerBrad King <brad.king@kitware.com>2021-01-06 11:13:03 -0500
commit0dcc03cd162d4c93c66ea8eaf3067702e7b1f461 (patch)
treebdcd9ea84a0ef4d4c0e3a5b35137c545a3258b62
parent91f0f4aa73a78b00af9cdeb6fb7a5a4236fbad80 (diff)
downloadcmake-0dcc03cd162d4c93c66ea8eaf3067702e7b1f461.tar.gz
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.
-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 ab0b5d8c27..a3d98f685f 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"