summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-17 12:04:59 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-03-17 12:05:29 (GMT)
commitd2e0b8bcfdf93806a01917e3692cc93a34d2f90c (patch)
treee6d9745f97ad345a7b31301d33fae1389f11dda2 /Source/cmTarget.cxx
parent2b720f6ab6b86db3eed13c107acda8562072ffef (diff)
parent60f57d0dccb18bfcb37e6bd0c6496cc2e7996d14 (diff)
downloadCMake-d2e0b8bcfdf93806a01917e3692cc93a34d2f90c.zip
CMake-d2e0b8bcfdf93806a01917e3692cc93a34d2f90c.tar.gz
CMake-d2e0b8bcfdf93806a01917e3692cc93a34d2f90c.tar.bz2
Merge topic 'prop_t'
60f57d0dcc cmPropertyMap: Introduce cmProp as return type for GetProperty() functions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4471
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 10515c2..0b01cda 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1771,7 +1771,7 @@ const char* cmTarget::GetProperty(const std::string& prop) const
}
}
- const char* retVal = impl->Properties.GetPropertyValue(prop);
+ cmProp retVal = impl->Properties.GetPropertyValue(prop);
if (!retVal) {
const bool chain =
impl->Makefile->GetState()->IsPropertyChained(prop, cmProperty::TARGET);
@@ -1779,8 +1779,9 @@ const char* cmTarget::GetProperty(const std::string& prop) const
return impl->Makefile->GetStateSnapshot().GetDirectory().GetProperty(
prop, chain);
}
+ return nullptr;
}
- return retVal;
+ return retVal->c_str();
}
const char* cmTarget::GetSafeProperty(const std::string& prop) const