summaryrefslogtreecommitdiffstats
path: root/Source/cmGetTargetPropertyCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGetTargetPropertyCommand.cxx')
-rw-r--r--Source/cmGetTargetPropertyCommand.cxx12
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;