diff options
author | Brad King <brad.king@kitware.com> | 2020-03-17 12:04:59 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-17 12:05:29 (GMT) |
commit | d2e0b8bcfdf93806a01917e3692cc93a34d2f90c (patch) | |
tree | e6d9745f97ad345a7b31301d33fae1389f11dda2 /Source/cmSourceFile.cxx | |
parent | 2b720f6ab6b86db3eed13c107acda8562072ffef (diff) | |
parent | 60f57d0dccb18bfcb37e6bd0c6496cc2e7996d14 (diff) | |
download | CMake-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/cmSourceFile.cxx')
-rw-r--r-- | Source/cmSourceFile.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index fd9cacd..5dc8b05 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -361,7 +361,7 @@ const char* cmSourceFile::GetProperty(const std::string& prop) const return output.c_str(); } - const char* retVal = this->Properties.GetPropertyValue(prop); + cmProp retVal = this->Properties.GetPropertyValue(prop); if (!retVal) { cmMakefile const* mf = this->Location.GetMakefile(); const bool chain = @@ -369,9 +369,10 @@ const char* cmSourceFile::GetProperty(const std::string& prop) const if (chain) { return mf->GetProperty(prop, chain); } + return nullptr; } - return retVal; + return retVal->c_str(); } const char* cmSourceFile::GetSafeProperty(const std::string& prop) const |