diff options
Diffstat (limited to 'Source/cmCommonTargetGenerator.cxx')
| -rw-r--r-- | Source/cmCommonTargetGenerator.cxx | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 7c2e20c..8d5ce7e 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -14,12 +14,12 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" -#include "cmProperty.h" #include "cmRange.h" #include "cmSourceFile.h" #include "cmStateTypes.h" #include "cmStringAlgorithms.h" #include "cmTarget.h" +#include "cmValue.h" cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt) : GeneratorTarget(gt) @@ -39,10 +39,10 @@ std::vector<std::string> const& cmCommonTargetGenerator::GetConfigNames() const return this->ConfigNames; } -const char* cmCommonTargetGenerator::GetFeature(const std::string& feature, - const std::string& config) +cmValue cmCommonTargetGenerator::GetFeature(const std::string& feature, + const std::string& config) { - return this->GeneratorTarget->GetFeature(feature, config)->c_str(); + return this->GeneratorTarget->GetFeature(feature, config); } void cmCommonTargetGenerator::AddModuleDefinitionFlag( @@ -56,7 +56,7 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag( } // TODO: Create a per-language flag variable. - cmProp defFileFlag = + cmValue defFileFlag = this->Makefile->GetDefinition("CMAKE_LINK_DEF_FILE_FLAG"); if (!defFileFlag) { return; @@ -240,11 +240,16 @@ std::string cmCommonTargetGenerator::GetManifests(const std::string& config) std::vector<std::string> manifests; manifests.reserve(manifest_srcs.size()); + + std::string lang = this->GeneratorTarget->GetLinkerLanguage(config); + std::string const& manifestFlag = + this->Makefile->GetDefinition("CMAKE_" + lang + "_LINKER_MANIFEST_FLAG"); for (cmSourceFile const* manifest_src : manifest_srcs) { - manifests.push_back(this->LocalCommonGenerator->ConvertToOutputFormat( - this->LocalCommonGenerator->MaybeRelativeToWorkDir( - manifest_src->GetFullPath()), - cmOutputConverter::SHELL)); + manifests.push_back(manifestFlag + + this->LocalCommonGenerator->ConvertToOutputFormat( + this->LocalCommonGenerator->MaybeRelativeToWorkDir( + manifest_src->GetFullPath()), + cmOutputConverter::SHELL)); } return cmJoin(manifests, " "); @@ -254,7 +259,7 @@ std::string cmCommonTargetGenerator::GetAIXExports(std::string const&) { std::string aixExports; if (this->GeneratorTarget->Target->IsAIX()) { - if (cmProp exportAll = + if (cmValue exportAll = this->GeneratorTarget->GetProperty("AIX_EXPORT_ALL_SYMBOLS")) { if (cmIsOff(*exportAll)) { aixExports = "-n"; @@ -270,7 +275,7 @@ void cmCommonTargetGenerator::AppendOSXVerFlag(std::string& flags, { // Lookup the flag to specify the version. std::string fvar = cmStrCat("CMAKE_", lang, "_OSX_", name, "_VERSION_FLAG"); - cmProp flag = this->Makefile->GetDefinition(fvar); + cmValue flag = this->Makefile->GetDefinition(fvar); // Skip if no such flag. if (!flag) { @@ -297,7 +302,7 @@ std::string cmCommonTargetGenerator::GetLinkerLauncher( const std::string& config) { std::string lang = this->GeneratorTarget->GetLinkerLanguage(config); - cmProp launcherProp = + cmValue launcherProp = this->GeneratorTarget->GetProperty(lang + "_LINKER_LAUNCHER"); if (cmNonempty(launcherProp)) { // Convert ;-delimited list to single string |
