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/cmExportFileGenerator.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/cmExportFileGenerator.cxx')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index c06f889..3c3c6df 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -35,7 +35,7 @@ cmExportFileGenerator::cmExportFileGenerator() } //---------------------------------------------------------------------------- -void cmExportFileGenerator::AddConfiguration(const char* config) +void cmExportFileGenerator::AddConfiguration(const std::string& config) { this->Configurations.push_back(config); } @@ -117,12 +117,12 @@ bool cmExportFileGenerator::GenerateImportFile() //---------------------------------------------------------------------------- void cmExportFileGenerator::GenerateImportConfig(std::ostream& os, - const char* config, + const std::string& config, std::vector<std::string> &missingTargets) { // Construct the property configuration suffix. std::string suffix = "_"; - if(config && *config) + if(!config.empty()) { suffix += cmSystemTools::UpperCase(config); } @@ -345,7 +345,7 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( true); this->ReplaceInstallPrefix(dirs); cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(dirs); - std::string exportDirs = cge->Evaluate(target->GetMakefile(), 0, + std::string exportDirs = cge->Evaluate(target->GetMakefile(), "", false, target); if (cge->GetHadContextSensitiveCondition()) @@ -426,7 +426,7 @@ void getPropertyContents(cmTarget const* tgt, const std::string& prop, //---------------------------------------------------------------------------- void getCompatibleInterfaceProperties(cmTarget *target, std::set<std::string> &ifaceProperties, - const char *config) + const std::string& config) { cmComputeLinkInformation *info = target->GetLinkInformation(config); @@ -490,7 +490,7 @@ void cmExportFileGenerator::PopulateCompatibleInterfaceProperties( if (target->GetType() != cmTarget::INTERFACE_LIBRARY) { - getCompatibleInterfaceProperties(target, ifaceProperties, 0); + getCompatibleInterfaceProperties(target, ifaceProperties, ""); std::vector<std::string> configNames; target->GetMakefile()->GetConfigurations(configNames); @@ -687,7 +687,7 @@ cmExportFileGenerator::ReplaceInstallPrefix(std::string &) //---------------------------------------------------------------------------- void cmExportFileGenerator -::SetImportLinkInterface(const char* config, std::string const& suffix, +::SetImportLinkInterface(const std::string& config, std::string const& suffix, cmGeneratorExpression::PreprocessContext preprocessRule, cmTarget* target, ImportPropertyMap& properties, std::vector<std::string>& missingTargets) @@ -762,7 +762,8 @@ cmExportFileGenerator //---------------------------------------------------------------------------- void cmExportFileGenerator -::SetImportDetailProperties(const char* config, std::string const& suffix, +::SetImportDetailProperties(const std::string& config, + std::string const& suffix, cmTarget* target, ImportPropertyMap& properties, std::vector<std::string>& missingTargets ) @@ -864,11 +865,11 @@ cmExportFileGenerator //---------------------------------------------------------------------------- void cmExportFileGenerator::GenerateImportHeaderCode(std::ostream& os, - const char* config) + const std::string& config) { os << "#----------------------------------------------------------------\n" << "# Generated CMake target import file"; - if(config) + if(!config.empty()) { os << " for configuration \"" << config << "\".\n"; } @@ -999,7 +1000,7 @@ cmExportFileGenerator //---------------------------------------------------------------------------- void cmExportFileGenerator -::GenerateImportPropertyCode(std::ostream& os, const char* config, +::GenerateImportPropertyCode(std::ostream& os, const std::string& config, cmTarget const* target, ImportPropertyMap const& properties) { @@ -1013,7 +1014,7 @@ cmExportFileGenerator << config << "\"\n"; os << "set_property(TARGET " << targetName << " APPEND PROPERTY IMPORTED_CONFIGURATIONS "; - if(config && *config) + if(!config.empty()) { os << cmSystemTools::UpperCase(config); } |