From 765a611956e58d763af4557b92115d3a451abff9 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Wed, 13 Mar 2024 14:01:49 +0100 Subject: NAG-Fortran: Added initial default compilation flags The configuration of the NAG Fortran compiler was previously missing the standard flags for debug, release and the other build types. --- Modules/Compiler/NAG-Fortran.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Modules/Compiler/NAG-Fortran.cmake b/Modules/Compiler/NAG-Fortran.cmake index b946cfd..a843001 100644 --- a/Modules/Compiler/NAG-Fortran.cmake +++ b/Modules/Compiler/NAG-Fortran.cmake @@ -28,6 +28,13 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS AND NOT CMAKE_Fortran_COMPILER_FORCED) endif() endif() +# Initial configuration flags. +string(APPEND CMAKE_Fortran_FLAGS_INIT " ") +string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -O2 -DNDEBUG") +string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O4 -DNDEBUG") +string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") + set(CMAKE_Fortran_SUBMODULE_SEP ".") set(CMAKE_Fortran_SUBMODULE_EXT ".sub") set(CMAKE_Fortran_MODDIR_FLAG "-mdir ") -- cgit v0.12