diff options
author | Brad King <brad.king@kitware.com> | 2020-06-03 10:12:24 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-06-03 10:12:31 (GMT) |
commit | 85a9f056a12582028123e88c4c9985ab2bf1220a (patch) | |
tree | ddcc05a3ec76fc2f084dc0a22f012b471509d91d /Source/cmGetTargetPropertyCommand.cxx | |
parent | 007109b20f8ef07cc8d473bf7bc3b97d4c3cd2b4 (diff) | |
parent | 056489d567b657bd1ebeae8bf78f4937f900b2e0 (diff) | |
download | CMake-85a9f056a12582028123e88c4c9985ab2bf1220a.zip CMake-85a9f056a12582028123e88c4c9985ab2bf1220a.tar.gz CMake-85a9f056a12582028123e88c4c9985ab2bf1220a.tar.bz2 |
Merge topic 'imported-local-target-alias'
056489d567 add_library/add_executable: allow local alias to imported targets
254f2b9058 Help: add_executable: Add TOC
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4837
Diffstat (limited to 'Source/cmGetTargetPropertyCommand.cxx')
-rw-r--r-- | Source/cmGetTargetPropertyCommand.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx index e5a3669..8a304be 100644 --- a/Source/cmGetTargetPropertyCommand.cxx +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -5,6 +5,7 @@ #include <sstream> #include "cmExecutionStatus.h" +#include "cmGlobalGenerator.h" #include "cmListFileCache.h" #include "cmMakefile.h" #include "cmMessageType.h" @@ -29,10 +30,17 @@ bool cmGetTargetPropertyCommand(std::vector<std::string> const& args, cmMakefile& mf = status.GetMakefile(); if (cmTarget* tgt = mf.FindTargetToUse(targetName)) { - if (args[2] == "ALIASED_TARGET") { + if (args[2] == "ALIASED_TARGET" || args[2] == "ALIAS_GLOBAL") { if (mf.IsAlias(targetName)) { - prop = tgt->GetName(); prop_exists = true; + if (args[2] == "ALIASED_TARGET") { + + prop = tgt->GetName(); + } + if (args[2] == "ALIAS_GLOBAL") { + prop = + mf.GetGlobalGenerator()->IsAlias(targetName) ? "TRUE" : "FALSE"; + } } } else if (!args[2].empty()) { cmProp prop_cstr = nullptr; |