diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-02-02 16:40:01 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-02-02 16:58:56 (GMT) |
commit | 33e27f6ca6b2ba1c92b5d428daf8eee769424853 (patch) | |
tree | 13731ac45c3dca8913f89604e419121c36ac2431 /Source/cmCommonTargetGenerator.cxx | |
parent | 84ada0b0c966413a9083fb77a2f6421c0d959666 (diff) | |
download | CMake-33e27f6ca6b2ba1c92b5d428daf8eee769424853.zip CMake-33e27f6ca6b2ba1c92b5d428daf8eee769424853.tar.gz CMake-33e27f6ca6b2ba1c92b5d428daf8eee769424853.tar.bz2 |
<LANG>_LINKER_LAUNCHER: Allow generator expressions
Diffstat (limited to 'Source/cmCommonTargetGenerator.cxx')
-rw-r--r-- | Source/cmCommonTargetGenerator.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 5fe6756..8f74ceb 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -7,6 +7,8 @@ #include <utility> #include "cmComputeLinkInformation.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorExpressionDAGChecker.h" #include "cmGeneratorTarget.h" #include "cmGlobalCommonGenerator.h" #include "cmGlobalGenerator.h" @@ -283,11 +285,17 @@ std::string cmCommonTargetGenerator::GetLinkerLauncher( const std::string& config) { std::string lang = this->GeneratorTarget->GetLinkerLanguage(config); - cmValue launcherProp = - this->GeneratorTarget->GetProperty(lang + "_LINKER_LAUNCHER"); + std::string propName = lang + "_LINKER_LAUNCHER"; + cmValue launcherProp = this->GeneratorTarget->GetProperty(propName); if (cmNonempty(launcherProp)) { + cmGeneratorExpressionDAGChecker dagChecker(this->GeneratorTarget, propName, + nullptr, nullptr); + std::string evaluatedLinklauncher = cmGeneratorExpression::Evaluate( + *launcherProp, this->LocalCommonGenerator, config, this->GeneratorTarget, + &dagChecker, this->GeneratorTarget, lang); // Convert ;-delimited list to single string - std::vector<std::string> args = cmExpandedList(*launcherProp, true); + std::vector<std::string> args = + cmExpandedList(evaluatedLinklauncher, true); if (!args.empty()) { args[0] = this->LocalCommonGenerator->ConvertToOutputFormat( args[0], cmOutputConverter::SHELL); |