diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-10 03:48:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:36 (GMT) |
commit | 84fdc9921cab35addba8c57cd201778de2cf87a4 (patch) | |
tree | a43cc1d2782da4bd54734beb3fa5494048a08a18 /Source/cmMakefile.cxx | |
parent | f154475b65738444414312d7d5a255f3220d90c6 (diff) | |
download | CMake-84fdc9921cab35addba8c57cd201778de2cf87a4.zip CMake-84fdc9921cab35addba8c57cd201778de2cf87a4.tar.gz CMake-84fdc9921cab35addba8c57cd201778de2cf87a4.tar.bz2 |
stringapi: Pass configuration names as strings
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d107ddf..1ef4d46 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2734,7 +2734,7 @@ void cmMakefile::AddDefaultDefinitions() } //---------------------------------------------------------------------------- -const char* +std::string cmMakefile::GetConfigurations(std::vector<std::string>& configs, bool single) const { @@ -2745,12 +2745,12 @@ cmMakefile::GetConfigurations(std::vector<std::string>& configs, { cmSystemTools::ExpandListArgument(configTypes, configs); } - return 0; + return ""; } else { - const char* buildType = this->GetDefinition("CMAKE_BUILD_TYPE"); - if(single && buildType && *buildType) + const std::string& buildType = this->GetSafeDefinition("CMAKE_BUILD_TYPE"); + if(single && !buildType.empty()) { configs.push_back(buildType); } @@ -3801,11 +3801,12 @@ bool cmMakefile::GetPropertyAsBool(const std::string& prop) const } //---------------------------------------------------------------------------- -const char* cmMakefile::GetFeature(const char* feature, const char* config) +const char* cmMakefile::GetFeature(const char* feature, + const std::string& config) { // TODO: Define accumulation policy for features (prepend, append, replace). // Currently we always replace. - if(config && *config) + if(!config.empty()) { std::string featureConfig = feature; featureConfig += "_"; |