Merge branch 'fortran-submodule-cray' into release-3.15

Merge-request: !3504
This commit is contained in:
Brad King
2019-07-11 13:01:02 -04:00
2 changed files with 9 additions and 1 deletions
+2
View File
@@ -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 .)
+7 -1
View File
@@ -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)