diff options
author | Brad King <brad.king@kitware.com> | 2018-07-03 14:56:25 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-07-03 14:56:31 (GMT) |
commit | 4330f10186e994b3a7b64729f8b4e64e10a30896 (patch) | |
tree | 9a651ec8fc6e84ef06bf2eee8f9eb1fa4913ff61 /Source/cmGeneratorTarget.cxx | |
parent | c4b1c0751d48c1c3b7ccf92f1306a0a162cd249e (diff) | |
parent | 42cc0644d5cc7a50ea2f65aa29b49f629ff17384 (diff) | |
download | CMake-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.cxx | 9 |
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 { |