diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-04-01 13:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-04-01 14:56:34 (GMT) |
commit | aba23c747b4a7fb342ae77d67b8b5cfbe9a67c8c (patch) | |
tree | 583a67deafe91340834232335a5e318039e2f0ff /Source/cmMakefile.h | |
parent | cfc92b483fbd3695d4a67843977e709ba4d7ea47 (diff) | |
download | CMake-aba23c747b4a7fb342ae77d67b8b5cfbe9a67c8c.zip CMake-aba23c747b4a7fb342ae77d67b8b5cfbe9a67c8c.tar.gz CMake-aba23c747b4a7fb342ae77d67b8b5cfbe9a67c8c.tar.bz2 |
cmMakefile::GetProperty: return cmProp
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index d628681..9a7eff9 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -58,6 +58,8 @@ class cmTestGenerator; class cmVariableWatch; class cmake; +using cmProp = const std::string*; + /** Flag if byproducts shall also be considered. */ enum class cmSourceOutputKind { @@ -417,7 +419,8 @@ public: } const char* GetIncludeRegularExpression() const { - return this->GetProperty("INCLUDE_REGULAR_EXPRESSION"); + cmProp p = this->GetProperty("INCLUDE_REGULAR_EXPRESSION"); + return p ? p->c_str() : nullptr; } /** @@ -795,8 +798,8 @@ public: void SetProperty(const std::string& prop, const char* value); void AppendProperty(const std::string& prop, const std::string& value, bool asString = false); - const char* GetProperty(const std::string& prop) const; - const char* GetProperty(const std::string& prop, bool chain) const; + cmProp GetProperty(const std::string& prop) const; + cmProp GetProperty(const std::string& prop, bool chain) const; bool GetPropertyAsBool(const std::string& prop) const; std::vector<std::string> GetPropertyKeys() const; |