summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorTarun Prabhu <tarun.prabhu@gmail.com>2023-08-18 14:56:37 (GMT)
committerBrad King <brad.king@kitware.com>2023-08-19 12:47:44 (GMT)
commit1140087adea98bd8d8974e4c18979f4949b52c34 (patch)
tree2989d223efe05d30f673456823174866deff9931 /Modules
parenta69c783749f769f41875ff818c68ead277fd24f9 (diff)
downloadCMake-1140087adea98bd8d8974e4c18979f4949b52c34.zip
CMake-1140087adea98bd8d8974e4c18979f4949b52c34.tar.gz
CMake-1140087adea98bd8d8974e4c18979f4949b52c34.tar.bz2
LLVMFlang-Fortran: Add flags for build types
Fixes: #25193
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/LLVMFlang-Fortran.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Compiler/LLVMFlang-Fortran.cmake b/Modules/Compiler/LLVMFlang-Fortran.cmake
index 9e72b06..291413e 100644
--- a/Modules/Compiler/LLVMFlang-Fortran.cmake
+++ b/Modules/Compiler/LLVMFlang-Fortran.cmake
@@ -14,3 +14,7 @@ set(CMAKE_Fortran_MODDIR_FLAG "-module-dir")
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")