Commit 6cd27a85 authored by Stephen Kelly's avatar Stephen Kelly

cmLocalGenerator: Move variable to where it can be used easily

parent 8b0e4795
Pipeline #31164 passed with stage
......@@ -722,6 +722,8 @@ std::string cmLocalGenerator::ExpandRuleVariable(
std::map<std::string, std::string>::iterator compIt =
compilers.find(variable);
std::string replace = this->Makefile->GetSafeDefinition(variable);
if (compIt != compilers.end()) {
std::string arg1 = compIt->first + "_ARG1";
compilerArg1 = this->Makefile->GetDefinition(arg1);
......@@ -743,7 +745,6 @@ std::string cmLocalGenerator::ExpandRuleVariable(
cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang);
}
if (actualReplace == variable) {
std::string replace = this->Makefile->GetSafeDefinition(variable);
// if the variable is not a FLAG then treat it like a path
if (variable.find("_FLAG") == variable.npos) {
std::string ret = this->ConvertToOutputForExisting(replace);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment