summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-30 17:29:25 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-03-30 17:30:48 (GMT)
commit888b8a43d82e6f6157642c2bd84520920d8e2d11 (patch)
tree23a1b0275674fb60f36feb9a4bfe31ef47317b70 /Source/cmTarget.cxx
parent615950dfb68bfd30736fb9b77753d91050c1a650 (diff)
parenta4255ecf813120e4b764e78e6c50b34bd87b438a (diff)
downloadCMake-888b8a43d82e6f6157642c2bd84520920d8e2d11.zip
CMake-888b8a43d82e6f6157642c2bd84520920d8e2d11.tar.gz
CMake-888b8a43d82e6f6157642c2bd84520920d8e2d11.tar.bz2
Merge topic 'cmprop-state'
a4255ecf81 cmStateDirectory::GetProperty: return cmProp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4536
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 8b51690..93c168a 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1779,8 +1779,11 @@ const char* cmTarget::GetProperty(const std::string& prop) const
const bool chain =
impl->Makefile->GetState()->IsPropertyChained(prop, cmProperty::TARGET);
if (chain) {
- return impl->Makefile->GetStateSnapshot().GetDirectory().GetProperty(
+ retVal = impl->Makefile->GetStateSnapshot().GetDirectory().GetProperty(
prop, chain);
+ if (retVal) {
+ return retVal->c_str();
+ }
}
return nullptr;
}