summaryrefslogtreecommitdiffstats
path: root/Source/cmGetPropertyCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-27 11:49:29 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-03-27 11:50:28 (GMT)
commita6611577c33538af959348b49aec817dd9649c03 (patch)
tree788be17486c62f52ca6966fb6640a60592242aa3 /Source/cmGetPropertyCommand.cxx
parent7e3d81b1df9e2c192585d83300344546439e50bd (diff)
parentc84cf42897e4d95706d4f750c2ad085c84a259f2 (diff)
downloadCMake-a6611577c33538af959348b49aec817dd9649c03.zip
CMake-a6611577c33538af959348b49aec817dd9649c03.tar.gz
CMake-a6611577c33538af959348b49aec817dd9649c03.tar.bz2
Merge topic 'cmprop-getglobalprop'
c84cf42897 cmState::GetGlobalProperty: return cmProp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4521
Diffstat (limited to 'Source/cmGetPropertyCommand.cxx')
-rw-r--r--Source/cmGetPropertyCommand.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 9623514..1d8f0a9 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -241,8 +241,9 @@ bool HandleGlobalMode(cmExecutionStatus& status, const std::string& name,
// Get the property.
cmake* cm = status.GetMakefile().GetCMakeInstance();
+ cmProp p = cm->GetState()->GetGlobalProperty(propertyName);
return StoreResult(infoType, status.GetMakefile(), variable,
- cm->GetState()->GetGlobalProperty(propertyName));
+ p ? p->c_str() : nullptr);
}
bool HandleDirectoryMode(cmExecutionStatus& status, const std::string& name,