diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-30 17:45:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-30 19:00:14 (GMT) |
commit | 3eec21a01cda630f34a4505d66bdbf6d5063ecdc (patch) | |
tree | 78481680659c0c29e7dc2cb4cac82bce280ce8a0 /Source/cmGetPropertyCommand.cxx | |
parent | 888b8a43d82e6f6157642c2bd84520920d8e2d11 (diff) | |
download | CMake-3eec21a01cda630f34a4505d66bdbf6d5063ecdc.zip CMake-3eec21a01cda630f34a4505d66bdbf6d5063ecdc.tar.gz CMake-3eec21a01cda630f34a4505d66bdbf6d5063ecdc.tar.bz2 |
cmTarget::GetProperty: return cmProp
Diffstat (limited to 'Source/cmGetPropertyCommand.cxx')
-rw-r--r-- | Source/cmGetPropertyCommand.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 1d8f0a9..c704803 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -310,7 +310,7 @@ bool HandleTargetMode(cmExecutionStatus& status, const std::string& name, } return StoreResult(infoType, status.GetMakefile(), variable, nullptr); } - const char* prop_cstr = nullptr; + cmProp prop_cstr = nullptr; cmListFileBacktrace bt = status.GetMakefile().GetBacktrace(); cmMessenger* messenger = status.GetMakefile().GetMessenger(); if (cmTargetPropertyComputer::PassesWhitelist( @@ -320,7 +320,8 @@ bool HandleTargetMode(cmExecutionStatus& status, const std::string& name, prop_cstr = target->GetProperty(propertyName); } } - return StoreResult(infoType, status.GetMakefile(), variable, prop_cstr); + return StoreResult(infoType, status.GetMakefile(), variable, + prop_cstr ? prop_cstr->c_str() : nullptr); } status.SetError(cmStrCat("could not find TARGET ", name, ". Perhaps it has not yet been created.")); |