summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-07-03 14:56:25 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-07-03 14:56:31 (GMT)
commit4330f10186e994b3a7b64729f8b4e64e10a30896 (patch)
tree9a651ec8fc6e84ef06bf2eee8f9eb1fa4913ff61 /Source/cmGeneratorTarget.cxx
parentc4b1c0751d48c1c3b7ccf92f1306a0a162cd249e (diff)
parent42cc0644d5cc7a50ea2f65aa29b49f629ff17384 (diff)
downloadCMake-4330f10186e994b3a7b64729f8b4e64e10a30896.zip
CMake-4330f10186e994b3a7b64729f8b4e64e10a30896.tar.gz
CMake-4330f10186e994b3a7b64729f8b4e64e10a30896.tar.bz2
Merge topic 'safe_property'
42cc0644d5 Autogen: Use default and remove custom GetSafeProperty functions 127094f2f0 Add GetSafeProperty method to cmTarget, cmGeneratorTarget and cmSourceFile Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2185
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index e07ccd9..3989ebe 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -221,6 +221,15 @@ const char* cmGeneratorTarget::GetProperty(const std::string& prop) const
return this->Target->GetProperty(prop);
}
+const char* cmGeneratorTarget::GetSafeProperty(const std::string& prop) const
+{
+ const char* ret = this->GetProperty(prop);
+ if (!ret) {
+ return "";
+ }
+ return ret;
+}
+
const char* cmGeneratorTarget::GetOutputTargetType(
cmStateEnums::ArtifactType artifact) const
{