summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2019-09-09 06:15:29 (GMT)
committerRolf Eike Beer <eb@emlix.com>2019-09-09 06:15:32 (GMT)
commit4d71bea02c5269c7648913e117d0863860139bd4 (patch)
tree0cc006905391bc8bfef4c2b3eb34b83dd8e4063d
parentd803d6b59f294b1bd1bd32beb75468399560be95 (diff)
downloadCMake-4d71bea02c5269c7648913e117d0863860139bd4.zip
CMake-4d71bea02c5269c7648913e117d0863860139bd4.tar.gz
CMake-4d71bea02c5269c7648913e117d0863860139bd4.tar.bz2
cmLocalGenerator::AddConfigVariableFlags: optimize string construction
-rw-r--r--Source/cmLocalGenerator.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 9152e94..93b26ed 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2089,12 +2089,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));
}
}