diff options
author | Brad King <brad.king@kitware.com> | 2019-07-11 17:01:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-07-11 17:01:02 (GMT) |
commit | 14f69fab54291838170e6e2e9988c81fa8c66a88 (patch) | |
tree | a411803f00afb7936262d8bd738865f9369be01d | |
parent | 86ead0b5a32ee48907084a7cf85d00196cbf0366 (diff) | |
parent | b0bcd4d7d2cb9defb790514375b78efbf60cc2e8 (diff) | |
download | CMake-14f69fab54291838170e6e2e9988c81fa8c66a88.zip CMake-14f69fab54291838170e6e2e9988c81fa8c66a88.tar.gz CMake-14f69fab54291838170e6e2e9988c81fa8c66a88.tar.bz2 |
Merge branch 'fortran-submodule-cray' into release-3.15
Merge-request: !3504
-rw-r--r-- | Modules/Compiler/Cray-Fortran.cmake | 2 | ||||
-rw-r--r-- | Source/cmFortranParserImpl.cxx | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Modules/Compiler/Cray-Fortran.cmake b/Modules/Compiler/Cray-Fortran.cmake index dbf28e3..ccb7c2e 100644 --- a/Modules/Compiler/Cray-Fortran.cmake +++ b/Modules/Compiler/Cray-Fortran.cmake @@ -4,6 +4,8 @@ include(Compiler/Cray) __compiler_cray(Fortran) +set(CMAKE_Fortran_SUBMODULE_SEP "") +set(CMAKE_Fortran_SUBMODULE_EXT ".mod") set(CMAKE_Fortran_MODOUT_FLAG -em) set(CMAKE_Fortran_MODDIR_FLAG -J) set(CMAKE_Fortran_MODDIR_DEFAULT .) diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx index 18e3c10..e8b1da8 100644 --- a/Source/cmFortranParserImpl.cxx +++ b/Source/cmFortranParserImpl.cxx @@ -79,7 +79,13 @@ std::string cmFortranParser_s::ModName(std::string const& mod_name) const std::string cmFortranParser_s::SModName(std::string const& mod_name, std::string const& sub_name) const { - return mod_name + this->Compiler.SModSep + sub_name + this->Compiler.SModExt; + std::string const& SModExt = + this->Compiler.SModExt.empty() ? ".mod" : this->Compiler.SModExt; + // An empty separator means that the compiler does not use a prefix. + if (this->Compiler.SModSep.empty()) { + return sub_name + SModExt; + } + return mod_name + this->Compiler.SModSep + sub_name + SModExt; } bool cmFortranParser_FilePush(cmFortranParser* parser, const char* fname) |