diff options
author | Brad King <brad.king@kitware.com> | 2023-09-28 23:36:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-10-03 13:15:24 (GMT) |
commit | 26bf32cdc67271547ca0b0d38872f8f23a90d191 (patch) | |
tree | cb7fff6bad7898d9ae422078394893d35136db25 /Tests/MSVCRuntimeLibrary | |
parent | e9af7b968756e72553296ecdcde6f36606a0babf (diff) | |
download | CMake-26bf32cdc67271547ca0b0d38872f8f23a90d191.zip CMake-26bf32cdc67271547ca0b0d38872f8f23a90d191.tar.gz CMake-26bf32cdc67271547ca0b0d38872f8f23a90d191.tar.bz2 |
LLVMFlang: Add support for targeting MSVC ABI on Windows
The compiler does not yet support everything needed to integrate well
with the MSVC ABI, in particular for runtime library selection and debug
format selection. Document them in FIXME comments and leave this
support undocumented by CMake for now.
Fixes: #24840
Inspired-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Diffstat (limited to 'Tests/MSVCRuntimeLibrary')
-rw-r--r-- | Tests/MSVCRuntimeLibrary/Fortran/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/MSVCRuntimeLibrary/Fortran/CMakeLists.txt b/Tests/MSVCRuntimeLibrary/Fortran/CMakeLists.txt index 41bd6f5..2a8a152 100644 --- a/Tests/MSVCRuntimeLibrary/Fortran/CMakeLists.txt +++ b/Tests/MSVCRuntimeLibrary/Fortran/CMakeLists.txt @@ -21,6 +21,13 @@ foreach(t MultiThreaded SingleThreaded) endforeach() endforeach() endforeach() +if(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang") + # LLVMFlang does not actually 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") function(verify_combinations threads lang src) |