summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-10-04 15:18:21 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-10-04 15:18:41 (GMT)
commit4c0300a1b8b0ac9cbd206598a6c1e0bb243052b7 (patch)
treeb669e73d40f46bbc53382dbd46a8879ffe7c334b /Modules/Compiler
parent1b88c0b641f351b3fe40ffe630553906deb64482 (diff)
parent26bf32cdc67271547ca0b0d38872f8f23a90d191 (diff)
downloadCMake-4c0300a1b8b0ac9cbd206598a6c1e0bb243052b7.zip
CMake-4c0300a1b8b0ac9cbd206598a6c1e0bb243052b7.tar.gz
CMake-4c0300a1b8b0ac9cbd206598a6c1e0bb243052b7.tar.bz2
Merge topic 'LLVMFlang-MSVC'
26bf32cdc6 LLVMFlang: Add support for targeting MSVC ABI on Windows e9af7b9687 LLVMFlang: Add support for CMAKE_Fortran_COMPILER_TARGET 26fa048ffe Tests: Enable CMP0091/CMP0141 for MSVC settings in FortranOnly test 9d060b8682 Fortran: Save CMAKE_LINKER variable persistently for MSVC ABI 7571e653f4 CMakeDetermineCompilerABI: Add option to skip implicit link info parsing 12733d0d8d CMakeParseImplicitLinkInfo: Detect link lines using link.exe and lld-link Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8852
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/LLVMFlang-Fortran.cmake14
1 files changed, 9 insertions, 5 deletions
diff --git a/Modules/Compiler/LLVMFlang-Fortran.cmake b/Modules/Compiler/LLVMFlang-Fortran.cmake
index 291413e..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")
@@ -15,6 +13,12 @@ set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nocpp")
set(CMAKE_Fortran_POSTPROCESS_FLAG "-ffixed-line-length-72")
-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")
+set(CMAKE_Fortran_COMPILE_OPTIONS_TARGET "--target=")
+
+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()