diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2018-07-02 10:39:54 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2018-07-02 10:39:54 (GMT) |
commit | 127094f2f0e444b78d224d933a28a8313e487d36 (patch) | |
tree | 5ff67f9ef579b54811dbd04418ad972b3883a6be /Source/cmGeneratorTarget.cxx | |
parent | 752c2721a17e95f642874562f6b406f1f05b4430 (diff) | |
download | CMake-127094f2f0e444b78d224d933a28a8313e487d36.zip CMake-127094f2f0e444b78d224d933a28a8313e487d36.tar.gz CMake-127094f2f0e444b78d224d933a28a8313e487d36.tar.bz2 |
Add GetSafeProperty method to cmTarget, cmGeneratorTarget and cmSourceFile
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 41e55a5..02f181e 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 { |