summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-03-09 11:22:45 (GMT)
committerBrad King <brad.king@kitware.com>2021-03-09 14:22:32 (GMT)
commit7b0ab0439d58b72617e6cbcb9d357a388da83f2b (patch)
tree787939118fc5e9b3c7e4cb5f34f23a1bb5342e06
parentb5f60c54d02ba9df7f2ba67200efb97446e0417a (diff)
downloadCMake-7b0ab0439d58b72617e6cbcb9d357a388da83f2b.zip
CMake-7b0ab0439d58b72617e6cbcb9d357a388da83f2b.tar.gz
CMake-7b0ab0439d58b72617e6cbcb9d357a388da83f2b.tar.bz2
Tests: Fix FortranModules 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/FortranModules/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/FortranModules/CMakeLists.txt b/Tests/FortranModules/CMakeLists.txt
index b7a6f68..94f5939 100644
--- a/Tests/FortranModules/CMakeLists.txt
+++ b/Tests/FortranModules/CMakeLists.txt
@@ -1,6 +1,11 @@
cmake_minimum_required (VERSION 3.9)
project(FortranModules Fortran)
+if("${CMAKE_Fortran_COMPILER_ID};${CMAKE_Fortran_SIMULATE_ID}" MATCHES "^Intel(LLVM)?;MSVC$")
+ string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -Z7")
+ string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO " -Z7")
+endif()
+
if(NOT DEFINED CMake_TEST_NESTED_MAKE_PROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
set(CMake_TEST_NESTED_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM}")
endif()