summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-10 14:01:52 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-10 14:02:00 (GMT)
commitc2ead49451cdd29da50954c88d45334694026ad0 (patch)
tree694ef8f666e1d9ea732ce18c06515c307dbd4807
parentf9a014e2c810799e0c148e44a2237704fdba717d (diff)
parent4d71bea02c5269c7648913e117d0863860139bd4 (diff)
downloadCMake-c2ead49451cdd29da50954c88d45334694026ad0.zip
CMake-c2ead49451cdd29da50954c88d45334694026ad0.tar.gz
CMake-c2ead49451cdd29da50954c88d45334694026ad0.tar.bz2
Merge topic 'local-var'
4d71bea02c cmLocalGenerator::AddConfigVariableFlags: optimize string construction Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3793
-rw-r--r--Source/cmLocalGenerator.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 25e4d01..5d831c9 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2096,12 +2096,11 @@ void cmLocalGenerator::AddConfigVariableFlags(std::string& flags,
const std::string& config)
{
// Add the flags from the variable itself.
- std::string flagsVar = var;
- this->AppendFlags(flags, this->Makefile->GetSafeDefinition(flagsVar));
+ this->AppendFlags(flags, this->Makefile->GetSafeDefinition(var));
// Add the flags from the build-type specific variable.
if (!config.empty()) {
- flagsVar += "_";
- flagsVar += cmSystemTools::UpperCase(config);
+ const std::string flagsVar =
+ cmStrCat(var, '_', cmSystemTools::UpperCase(config));
this->AppendFlags(flags, this->Makefile->GetSafeDefinition(flagsVar));
}
}