From 0dcc03cd162d4c93c66ea8eaf3067702e7b1f461 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 6 Jan 2021 11:13:03 -0500 Subject: 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. --- Tests/ConfigSources/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) 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_$.cpp" -- cgit v1.2.1