diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-02 07:14:28 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-24 18:04:37 (GMT) |
commit | ad0b0089ab9f094192f6109067d79ef5e66c85b7 (patch) | |
tree | 215ab036441e3034b30620b4e9aba8298a475453 /Source/cmLocalGenerator.cxx | |
parent | 314c9ae33bfd304c9622b89ec62bca052f6e0d39 (diff) | |
download | CMake-ad0b0089ab9f094192f6109067d79ef5e66c85b7.zip CMake-ad0b0089ab9f094192f6109067d79ef5e66c85b7.tar.gz CMake-ad0b0089ab9f094192f6109067d79ef5e66c85b7.tar.bz2 |
cmLocalGenerator: Simplify GetFeature implementation.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 169cdf4..2a88e3c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2368,19 +2368,15 @@ void cmLocalGenerator::AppendFeatureOptions( const char* cmLocalGenerator::GetFeature(const std::string& feature, const std::string& config) { + std::string featureName = feature; // TODO: Define accumulation policy for features (prepend, append, replace). // Currently we always replace. if(!config.empty()) { - std::string featureConfig = feature; - featureConfig += "_"; - featureConfig += cmSystemTools::UpperCase(config); - if(const char* value = this->Makefile->GetProperty(featureConfig)) - { - return value; - } + featureName += "_"; + featureName += cmSystemTools::UpperCase(config); } - if(const char* value = this->Makefile->GetProperty(feature)) + if(const char* value = this->Makefile->GetProperty(featureName)) { return value; } |