diff options
author | Brad King <brad.king@kitware.com> | 2020-03-27 11:49:29 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-27 11:50:28 (GMT) |
commit | a6611577c33538af959348b49aec817dd9649c03 (patch) | |
tree | 788be17486c62f52ca6966fb6640a60592242aa3 /Source/cmGetPropertyCommand.cxx | |
parent | 7e3d81b1df9e2c192585d83300344546439e50bd (diff) | |
parent | c84cf42897e4d95706d4f750c2ad085c84a259f2 (diff) | |
download | CMake-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.cxx | 3 |
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, |