From d80ecba5c27ec249dc85c3a3559db822ef320d05 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 13 Feb 2019 14:08:34 -0500 Subject: 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 --- Source/cmLocalUnixMakefileGenerator3.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx') diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index d6f71d320d..7eb4a03d57 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1808,6 +1808,17 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo( << "_COMPILER_ID \"" << cid << "\")\n"; } + if (implicitLang.first == "Fortran") { + std::string smodSep = + this->Makefile->GetSafeDefinition("CMAKE_Fortran_SUBMODULE_SEP"); + std::string smodExt = + this->Makefile->GetSafeDefinition("CMAKE_Fortran_SUBMODULE_EXT"); + cmakefileStream << "set(CMAKE_Fortran_SUBMODULE_SEP \"" << smodSep + << "\")\n"; + cmakefileStream << "set(CMAKE_Fortran_SUBMODULE_EXT \"" << smodExt + << "\")\n"; + } + // Build a list of preprocessor definitions for the target. std::set defines; this->GetTargetDefines(target, this->ConfigName, implicitLang.first, -- cgit v1.2.1