diff options
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; |