summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-11-20 19:15:05 (GMT)
committerBrad King <brad.king@kitware.com>2023-12-06 14:42:07 (GMT)
commit48302b469e10f37b8961b6556080df66ba11289f (patch)
tree3bd0aebacced4032487c22c6ac8b64204a019c20 /Tests
parent1c07758ca2ee8dfbd43ca582d16f36a97177b24c (diff)
downloadCMake-48302b469e10f37b8961b6556080df66ba11289f.zip
CMake-48302b469e10f37b8961b6556080df66ba11289f.tar.gz
CMake-48302b469e10f37b8961b6556080df66ba11289f.tar.bz2
LLVMFlang: Update MSVC runtime library selection for LLVMFlang 18.0
LLVMFlang 18.0 adds MSVC runtime library selection flags and associated Fortran runtime library variants. Resolve the corresponding FIXME left by commit 26bf32cdc6 (LLVMFlang: Add support for targeting MSVC ABI on Windows, 2023-09-28, v3.28.0-rc1~10^2). Issue: #24840
Diffstat (limited to 'Tests')
-rw-r--r--Tests/MSVCRuntimeLibrary/Fortran/CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/Tests/MSVCRuntimeLibrary/Fortran/CMakeLists.txt b/Tests/MSVCRuntimeLibrary/Fortran/CMakeLists.txt
index 2a8a152..4cd200a 100644
--- a/Tests/MSVCRuntimeLibrary/Fortran/CMakeLists.txt
+++ b/Tests/MSVCRuntimeLibrary/Fortran/CMakeLists.txt
@@ -21,14 +21,16 @@ foreach(t MultiThreaded SingleThreaded)
endforeach()
endforeach()
endforeach()
-if(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
- # LLVMFlang does not actually define these, so inject them
+if(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang" AND CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0)
+ # LLVMFlang < 18.0 does not define these, so inject them.
set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded "-D_MT")
set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL "-D_MT;-D_DLL")
set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug "-D_MT;-D_DEBUG")
set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL "-D_MT;-D_DEBUG;-D_DLL")
endif()
-string(APPEND CMAKE_Fortran_FLAGS " -w")
+if(NOT CMAKE_Fortran_SIMULATE_ID STREQUAL "MSVC")
+ string(APPEND CMAKE_Fortran_FLAGS " -w")
+endif()
function(verify_combinations threads lang src)
set(verify_tc_config_ Release)