diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-14 20:59:05 (GMT) |
---|---|---|
committer | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-17 20:52:32 (GMT) |
commit | 0e1faa28cbd12d400b876f7a21d91aad5a837196 (patch) | |
tree | 172e3de65933e8056a996fc923a06f90a62081c2 /Source/cmMakefile.h | |
parent | 56c204e8eb8914b2ca273a56119cf1c40e13d75d (diff) | |
download | CMake-0e1faa28cbd12d400b876f7a21d91aad5a837196.zip CMake-0e1faa28cbd12d400b876f7a21d91aad5a837196.tar.gz CMake-0e1faa28cbd12d400b876f7a21d91aad5a837196.tar.bz2 |
cmMakefile: Separate custom command setup from actual creation
Refactor custom command manipulation functions to consist of a setup and a
commit stage. The commit stage will be delayed to generate time.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index ed118db..19a71ad 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -181,18 +181,18 @@ public: const std::string& job_pool = "", bool command_expand_lists = false, ObjectLibraryCommands objLibraryCommands = RejectObjectLibraryCommands); cmSourceFile* AddCustomCommandToOutput( - const std::vector<std::string>& outputs, - const std::vector<std::string>& byproducts, - const std::vector<std::string>& depends, + const std::string& output, const std::vector<std::string>& depends, const std::string& main_dependency, - const cmImplicitDependsList& implicit_depends, const cmCustomCommandLines& commandLines, const char* comment, const char* workingDir, bool replace = false, bool escapeOldStyle = true, bool uses_terminal = false, bool command_expand_lists = false, const std::string& depfile = "", const std::string& job_pool = ""); cmSourceFile* AddCustomCommandToOutput( - const std::string& output, const std::vector<std::string>& depends, + const std::vector<std::string>& outputs, + const std::vector<std::string>& byproducts, + const std::vector<std::string>& depends, const std::string& main_dependency, + const cmImplicitDependsList& implicit_depends, const cmCustomCommandLines& commandLines, const char* comment, const char* workingDir, bool replace = false, bool escapeOldStyle = true, bool uses_terminal = false, bool command_expand_lists = false, @@ -1069,6 +1069,39 @@ private: bool ValidateCustomCommand(const cmCustomCommandLines& commandLines) const; + void CommitCustomCommandToTarget( + cmTarget* target, const std::vector<std::string>& byproducts, + const std::vector<std::string>& depends, + const cmCustomCommandLines& commandLines, cmTarget::CustomCommandType type, + const char* comment, const char* workingDir, bool escapeOldStyle, + bool uses_terminal, const std::string& depfile, + const std::string& job_pool, bool command_expand_lists); + cmSourceFile* CommitCustomCommandToOutput( + const std::vector<std::string>& outputs, + const std::vector<std::string>& byproducts, + const std::vector<std::string>& depends, + const std::string& main_dependency, + const cmImplicitDependsList& implicit_depends, + const cmCustomCommandLines& commandLines, const char* comment, + const char* workingDir, bool replace, bool escapeOldStyle, + bool uses_terminal, bool command_expand_lists, const std::string& depfile, + const std::string& job_pool); + void CommitAppendCustomCommandToOutput( + const std::string& output, const std::vector<std::string>& depends, + const cmImplicitDependsList& implicit_depends, + const cmCustomCommandLines& commandLines); + + void CommitUtilityCommand(cmTarget* target, const std::string& force, + const std::string& forceCMP0049, + const char* workingDirectory, + const std::vector<std::string>& byproducts, + const std::vector<std::string>& depends, + const cmCustomCommandLines& commandLines, + bool escapeOldStyle, const char* comment, + bool uses_terminal, bool command_expand_lists, + const std::string& job_pool); + + void CreateGeneratedSource(const std::string& output); void CreateGeneratedSources(const std::vector<std::string>& outputs); /** @@ -1104,6 +1137,11 @@ private: void UpdateOutputToSourceMap(std::string const& output, cmSourceFile* source, bool byproduct); + /** + * Return if the provided source file might have a custom command. + */ + bool MightHaveCustomCommand(const std::string& name) const; + bool AddRequiredTargetCFeature(cmTarget* target, const std::string& feature, std::string* error = nullptr) const; |