|
@@ -69,6 +69,17 @@ cmFortranParser_s::~cmFortranParser_s()
|
|
|
cmFortran_yylex_destroy(this->Scanner);
|
|
cmFortran_yylex_destroy(this->Scanner);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+std::string cmFortranParser_s::ModName(std::string const& mod_name) const
|
|
|
|
|
+{
|
|
|
|
|
+ return mod_name + ".mod";
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+std::string cmFortranParser_s::SModName(std::string const& mod_name,
|
|
|
|
|
+ std::string const& sub_name) const
|
|
|
|
|
+{
|
|
|
|
|
+ return mod_name + "@" + sub_name + ".smod";
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
bool cmFortranParser_FilePush(cmFortranParser* parser, const char* fname)
|
|
bool cmFortranParser_FilePush(cmFortranParser* parser, const char* fname)
|
|
|
{
|
|
{
|
|
|
// Open the new file and push it onto the stack. Save the old
|
|
// Open the new file and push it onto the stack. Save the old
|
|
@@ -178,7 +189,7 @@ void cmFortranParser_RuleUse(cmFortranParser* parser, const char* module_name)
|
|
|
// syntax: "use module_name"
|
|
// syntax: "use module_name"
|
|
|
// requires: "module_name.mod"
|
|
// requires: "module_name.mod"
|
|
|
std::string const& mod_name = cmSystemTools::LowerCase(module_name);
|
|
std::string const& mod_name = cmSystemTools::LowerCase(module_name);
|
|
|
- parser->Info.Requires.insert(mod_name + ".mod");
|
|
|
|
|
|
|
+ parser->Info.Requires.insert(parser->ModName(mod_name));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void cmFortranParser_RuleLineDirective(cmFortranParser* parser,
|
|
void cmFortranParser_RuleLineDirective(cmFortranParser* parser,
|
|
@@ -242,7 +253,7 @@ void cmFortranParser_RuleModule(cmFortranParser* parser,
|
|
|
// syntax: "module module_name"
|
|
// syntax: "module module_name"
|
|
|
// provides: "module_name.mod"
|
|
// provides: "module_name.mod"
|
|
|
std::string const& mod_name = cmSystemTools::LowerCase(module_name);
|
|
std::string const& mod_name = cmSystemTools::LowerCase(module_name);
|
|
|
- parser->Info.Provides.insert(mod_name + ".mod");
|
|
|
|
|
|
|
+ parser->Info.Provides.insert(parser->ModName(mod_name));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -265,8 +276,8 @@ void cmFortranParser_RuleSubmodule(cmFortranParser* parser,
|
|
|
|
|
|
|
|
std::string const& mod_name = cmSystemTools::LowerCase(module_name);
|
|
std::string const& mod_name = cmSystemTools::LowerCase(module_name);
|
|
|
std::string const& sub_name = cmSystemTools::LowerCase(submodule_name);
|
|
std::string const& sub_name = cmSystemTools::LowerCase(submodule_name);
|
|
|
- parser->Info.Requires.insert(mod_name + ".mod");
|
|
|
|
|
- parser->Info.Provides.insert(mod_name + "@" + sub_name + ".smod");
|
|
|
|
|
|
|
+ parser->Info.Requires.insert(parser->ModName(mod_name));
|
|
|
|
|
+ parser->Info.Provides.insert(parser->SModName(mod_name, sub_name));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void cmFortranParser_RuleSubmoduleNested(cmFortranParser* parser,
|
|
void cmFortranParser_RuleSubmoduleNested(cmFortranParser* parser,
|
|
@@ -286,8 +297,8 @@ void cmFortranParser_RuleSubmoduleNested(cmFortranParser* parser,
|
|
|
std::string const& sub_name = cmSystemTools::LowerCase(submodule_name);
|
|
std::string const& sub_name = cmSystemTools::LowerCase(submodule_name);
|
|
|
std::string const& nest_name =
|
|
std::string const& nest_name =
|
|
|
cmSystemTools::LowerCase(nested_submodule_name);
|
|
cmSystemTools::LowerCase(nested_submodule_name);
|
|
|
- parser->Info.Requires.insert(mod_name + "@" + sub_name + ".smod");
|
|
|
|
|
- parser->Info.Provides.insert(mod_name + "@" + nest_name + ".smod");
|
|
|
|
|
|
|
+ parser->Info.Requires.insert(parser->SModName(mod_name, sub_name));
|
|
|
|
|
+ parser->Info.Provides.insert(parser->SModName(mod_name, nest_name));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void cmFortranParser_RuleDefine(cmFortranParser* parser, const char* macro)
|
|
void cmFortranParser_RuleDefine(cmFortranParser* parser, const char* macro)
|