mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-28 19:58:34 -06:00
Merge topic 'fortran-submodule-cray'
b0bcd4d7d2Fortran: Add support for submodules on Cray33de4d27ebFortran: Support compilers using no module prefix on submodule files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3504
This commit is contained in:
@@ -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 .)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user