diff options
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index d918abe..04a1f2d 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 { @@ -117,6 +119,9 @@ public: bool ReadListFile(const std::string& filename); + bool ReadListFileAsString(const std::string& content, + const std::string& virtualFileName); + bool ReadDependentFile(const std::string& filename, bool noPolicyScope = true); @@ -183,7 +188,8 @@ public: const cmCustomCommandLines& commandLines, cmCustomCommandType type, const char* comment, const char* workingDir, bool escapeOldStyle = true, bool uses_terminal = false, const std::string& depfile = "", - const std::string& job_pool = "", bool command_expand_lists = false); + const std::string& job_pool = "", bool command_expand_lists = false, + bool stdPipesUTF8 = false); /** * Called for each file with custom command. @@ -200,7 +206,8 @@ public: const char* workingDir, const CommandSourceCallback& callback = nullptr, bool replace = false, bool escapeOldStyle = true, bool uses_terminal = false, bool command_expand_lists = false, - const std::string& depfile = "", const std::string& job_pool = ""); + const std::string& depfile = "", const std::string& job_pool = "", + bool stdPipesUTF8 = false); void AddCustomCommandToOutput( const std::vector<std::string>& outputs, const std::vector<std::string>& byproducts, @@ -211,7 +218,8 @@ public: const char* workingDir, const CommandSourceCallback& callback = nullptr, bool replace = false, bool escapeOldStyle = true, bool uses_terminal = false, bool command_expand_lists = false, - const std::string& depfile = "", const std::string& job_pool = ""); + const std::string& depfile = "", const std::string& job_pool = "", + bool stdPipesUTF8 = false); void AddCustomCommandOldStyle(const std::string& target, const std::vector<std::string>& outputs, const std::vector<std::string>& depends, @@ -279,7 +287,8 @@ public: const std::vector<std::string>& depends, const cmCustomCommandLines& commandLines, bool escapeOldStyle = true, const char* comment = nullptr, bool uses_terminal = false, - bool command_expand_lists = false, const std::string& job_pool = ""); + bool command_expand_lists = false, const std::string& job_pool = "", + bool stdPipesUTF8 = false); /** * Add a subdirectory to the build. @@ -314,6 +323,12 @@ public: void AddCacheDefinition(const std::string& name, const char* value, const char* doc, cmStateEnums::CacheEntryType type, bool force = false); + void AddCacheDefinition(const std::string& name, const std::string& value, + const char* doc, cmStateEnums::CacheEntryType type, + bool force = false) + { + AddCacheDefinition(name, value.c_str(), doc, type, force); + } /** * Remove a variable definition from the build. This is not valid @@ -408,7 +423,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; } /** @@ -786,8 +802,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; |