summaryrefslogtreecommitdiff
path: root/Modules/Compiler/GNU-Fortran.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-13 14:08:34 -0500
committerBrad King <brad.king@kitware.com>2019-02-14 10:23:02 -0500
commitd80ecba5c27ec249dc85c3a3559db822ef320d05 (patch)
tree1484c5669fbc156caf8dcd68f624759267428da8 /Modules/Compiler/GNU-Fortran.cmake
parent72057d9c1582f4b6dec66cd0675860c4c335636e (diff)
downloadcmake-d80ecba5c27ec249dc85c3a3559db822ef320d05.tar.gz
Fortran: Fix submodule file names across compilers
The naming convention for submodule files varies across compilers. Add a table to the compiler information modules and thread the information through to the Fortran module dependency parser. Fill out the table for compiler ids known to support Fortran submodules. Fixes: #18746
Diffstat (limited to 'Modules/Compiler/GNU-Fortran.cmake')
-rw-r--r--Modules/Compiler/GNU-Fortran.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/Compiler/GNU-Fortran.cmake b/Modules/Compiler/GNU-Fortran.cmake
index c333d500b4..6413769cfc 100644
--- a/Modules/Compiler/GNU-Fortran.cmake
+++ b/Modules/Compiler/GNU-Fortran.cmake
@@ -1,6 +1,9 @@
include(Compiler/GNU)
__compiler_gnu(Fortran)
+set(CMAKE_Fortran_SUBMODULE_SEP "@")
+set(CMAKE_Fortran_SUBMODULE_EXT ".smod")
+
set(CMAKE_Fortran_PREPROCESS_SOURCE
"<CMAKE_Fortran_COMPILER> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> -o <PREPROCESSED_SOURCE>")