diff options
Diffstat (limited to 'Source/cmCommonTargetGenerator.cxx')
-rw-r--r-- | Source/cmCommonTargetGenerator.cxx | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 228cff7..7c2e20c 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -15,6 +15,7 @@ #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmProperty.h" +#include "cmRange.h" #include "cmSourceFile.h" #include "cmStateTypes.h" #include "cmStringAlgorithms.h" @@ -241,8 +242,7 @@ std::string cmCommonTargetGenerator::GetManifests(const std::string& config) manifests.reserve(manifest_srcs.size()); for (cmSourceFile const* manifest_src : manifest_srcs) { manifests.push_back(this->LocalCommonGenerator->ConvertToOutputFormat( - this->LocalCommonGenerator->MaybeConvertToRelativePath( - this->LocalCommonGenerator->GetWorkingDirectory(), + this->LocalCommonGenerator->MaybeRelativeToWorkDir( manifest_src->GetFullPath()), cmOutputConverter::SHELL)); } @@ -292,3 +292,24 @@ void cmCommonTargetGenerator::AppendOSXVerFlag(std::string& flags, this->LocalCommonGenerator->AppendFlags(flags, vflag.str()); } } + +std::string cmCommonTargetGenerator::GetLinkerLauncher( + const std::string& config) +{ + std::string lang = this->GeneratorTarget->GetLinkerLanguage(config); + cmProp launcherProp = + this->GeneratorTarget->GetProperty(lang + "_LINKER_LAUNCHER"); + if (cmNonempty(launcherProp)) { + // Convert ;-delimited list to single string + std::vector<std::string> args = cmExpandedList(*launcherProp, true); + if (!args.empty()) { + args[0] = this->LocalCommonGenerator->ConvertToOutputFormat( + args[0], cmOutputConverter::SHELL); + for (std::string& i : cmMakeRange(args.begin() + 1, args.end())) { + i = this->LocalCommonGenerator->EscapeForShell(i); + } + return cmJoin(args, " "); + } + } + return std::string(); +} |