diff options
author | Brad King <brad.king@kitware.com> | 2019-07-08 15:43:31 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-08 15:43:39 (GMT) |
commit | 58d10debe1d71d15d3d0a1731211f4d0ee9e0daa (patch) | |
tree | f3a5388ca3f1027f56791107112643de31f6e189 /Source | |
parent | a6a698aafb8fea7191669d9e9ca2bce0fb3be73f (diff) | |
parent | b0bcd4d7d2cb9defb790514375b78efbf60cc2e8 (diff) | |
download | CMake-58d10debe1d71d15d3d0a1731211f4d0ee9e0daa.zip CMake-58d10debe1d71d15d3d0a1731211f4d0ee9e0daa.tar.gz CMake-58d10debe1d71d15d3d0a1731211f4d0ee9e0daa.tar.bz2 |
Merge topic 'fortran-submodule-cray'
b0bcd4d7d2 Fortran: Add support for submodules on Cray
33de4d27eb Fortran: Support compilers using no module prefix on submodule files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3504
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFortranParserImpl.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
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) |