summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-09 08:34:48 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-10-15 09:25:12 (GMT)
commit6cd27a853a1c77e5da0a9a14140284a7674cf18c (patch)
tree2ade1d207c1bcad38d95c67ff87834c37048108b /Source
parent8b0e4795687a2ea289d1313db24d75bcf3cd13bc (diff)
downloadCMake-6cd27a853a1c77e5da0a9a14140284a7674cf18c.zip
CMake-6cd27a853a1c77e5da0a9a14140284a7674cf18c.tar.gz
CMake-6cd27a853a1c77e5da0a9a14140284a7674cf18c.tar.bz2
cmLocalGenerator: Move variable to where it can be used easily
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index c405180..03f5d2c 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -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);