diff options
author | Brad King <brad.king@kitware.com> | 2019-09-10 14:01:52 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-10 14:02:00 (GMT) |
commit | c2ead49451cdd29da50954c88d45334694026ad0 (patch) | |
tree | 694ef8f666e1d9ea732ce18c06515c307dbd4807 | |
parent | f9a014e2c810799e0c148e44a2237704fdba717d (diff) | |
parent | 4d71bea02c5269c7648913e117d0863860139bd4 (diff) | |
download | CMake-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.cxx | 7 |
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)); } } |