diff options
author | Brad King <brad.king@kitware.com> | 2012-04-18 18:42:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-04-18 19:48:50 (GMT) |
commit | f9b758e91a9afa17123c5b81b5568ebbd52db598 (patch) | |
tree | 33ebdb71d5986a7a3031a4f301110c57d83a90b6 /Source/cmMakefile.h | |
parent | 31e7fadbb3bfd225e0d48e2d072ccc745d7f2689 (diff) | |
download | CMake-f9b758e91a9afa17123c5b81b5568ebbd52db598.zip CMake-f9b758e91a9afa17123c5b81b5568ebbd52db598.tar.gz CMake-f9b758e91a9afa17123c5b81b5568ebbd52db598.tar.bz2 |
Cleanup custom command .rule file internal handling
Teach cmMakefile::AddCustomCommandToOutput to return the cmSourceFile
instance to which the custom command is attached. Use the return value
instead of separately adding a .rule extension and searching for the
source. Mark CMake-generated .rule files explicitly with a property
instead of trusting the file extension.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 960ba39..8b3bef7 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -175,20 +175,22 @@ public: cmTarget::CustomCommandType type, const char* comment, const char* workingDir, bool escapeOldStyle = true); - void AddCustomCommandToOutput(const std::vector<std::string>& outputs, - const std::vector<std::string>& depends, - const char* main_dependency, - const cmCustomCommandLines& commandLines, - const char* comment, const char* workingDir, - bool replace = false, - bool escapeOldStyle = true); - void AddCustomCommandToOutput(const char* output, - const std::vector<std::string>& depends, - const char* main_dependency, - const cmCustomCommandLines& commandLines, - const char* comment, const char* workingDir, - bool replace = false, - bool escapeOldStyle = true); + cmSourceFile* AddCustomCommandToOutput( + const std::vector<std::string>& outputs, + const std::vector<std::string>& depends, + const char* main_dependency, + const cmCustomCommandLines& commandLines, + const char* comment, const char* workingDir, + bool replace = false, + bool escapeOldStyle = true); + cmSourceFile* AddCustomCommandToOutput( + const char* output, + const std::vector<std::string>& depends, + const char* main_dependency, + const cmCustomCommandLines& commandLines, + const char* comment, const char* workingDir, + bool replace = false, + bool escapeOldStyle = true); void AddCustomCommandOldStyle(const char* target, const std::vector<std::string>& outputs, const std::vector<std::string>& depends, |