summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/LLVMFlang-Fortran.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-28 23:36:56 (GMT)
committerBrad King <brad.king@kitware.com>2023-10-03 13:15:24 (GMT)
commit26bf32cdc67271547ca0b0d38872f8f23a90d191 (patch)
treecb7fff6bad7898d9ae422078394893d35136db25 /Modules/Compiler/LLVMFlang-Fortran.cmake
parente9af7b968756e72553296ecdcde6f36606a0babf (diff)
downloadCMake-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 'Modules/Compiler/LLVMFlang-Fortran.cmake')
-rw-r--r--Modules/Compiler/LLVMFlang-Fortran.cmake12
1 files changed, 7 insertions, 5 deletions
diff --git a/Modules/Compiler/LLVMFlang-Fortran.cmake b/Modules/Compiler/LLVMFlang-Fortran.cmake
index 6b0c0fc..d27f094 100644
--- a/Modules/Compiler/LLVMFlang-Fortran.cmake
+++ b/Modules/Compiler/LLVMFlang-Fortran.cmake
@@ -1,5 +1,3 @@
-set(CMAKE_Fortran_VERBOSE_FLAG "-v")
-
set(CMAKE_Fortran_SUBMODULE_SEP "-")
set(CMAKE_Fortran_SUBMODULE_EXT ".mod")
@@ -17,6 +15,10 @@ set(CMAKE_Fortran_POSTPROCESS_FLAG "-ffixed-line-length-72")
set(CMAKE_Fortran_COMPILE_OPTIONS_TARGET "--target=")
-string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -O0 -g")
-string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
-string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
+if(NOT "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC")
+ set(CMAKE_Fortran_VERBOSE_FLAG "-v")
+
+ string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -O0 -g")
+ string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
+ string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
+endif()