diff options
author | Brad King <brad.king@kitware.com> | 2006-09-28 15:30:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-09-28 15:30:49 (GMT) |
commit | d01b6f12819c4d8aec189ae3eebfd1779565bbf2 (patch) | |
tree | 90a04b304477a20c1adbc46b5ee2d892e4aae64b /Source/cmMakefile.cxx | |
parent | 16f8da8b1443b7ebb315f40aa1ae199d87f211de (diff) | |
download | CMake-d01b6f12819c4d8aec189ae3eebfd1779565bbf2.zip CMake-d01b6f12819c4d8aec189ae3eebfd1779565bbf2.tar.gz CMake-d01b6f12819c4d8aec189ae3eebfd1779565bbf2.tar.bz2 |
ENH: Added VERBATIM option to ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET commands. This option enables full escaping of custom command arguments on all platforms. See bug#3786.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 1e1b15f..38be4ca 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -554,7 +554,8 @@ cmMakefile::AddCustomCommandToTarget(const char* target, const cmCustomCommandLines& commandLines, cmTarget::CustomCommandType type, const char* comment, - const char* workingDir) + const char* workingDir, + bool escapeOldStyle) { // Find the target to which to add the custom command. cmTargets::iterator ti = this->Targets.find(target); @@ -563,6 +564,7 @@ cmMakefile::AddCustomCommandToTarget(const char* target, // Add the command to the appropriate build step for the target. std::vector<std::string> no_output; cmCustomCommand cc(no_output, depends, commandLines, comment, workingDir); + cc.SetEscapeOldStyle(escapeOldStyle); switch(type) { case cmTarget::PRE_BUILD: @@ -598,7 +600,8 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs, const cmCustomCommandLines& commandLines, const char* comment, const char* workingDir, - bool replace) + bool replace, + bool escapeOldStyle) { // Make sure there is at least one output. if(outputs.empty()) @@ -686,6 +689,7 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs, cmCustomCommand* cc = new cmCustomCommand(outputs, depends2, commandLines, comment, workingDir); + cc->SetEscapeOldStyle(escapeOldStyle); file->SetCustomCommand(cc); } } @@ -698,13 +702,14 @@ cmMakefile::AddCustomCommandToOutput(const char* output, const cmCustomCommandLines& commandLines, const char* comment, const char* workingDir, - bool replace) + bool replace, + bool escapeOldStyle) { std::vector<std::string> outputs; outputs.push_back(output); this->AddCustomCommandToOutput(outputs, depends, main_dependency, commandLines, comment, workingDir, - replace); + replace, escapeOldStyle); } //---------------------------------------------------------------------------- @@ -819,7 +824,8 @@ void cmMakefile::AddUtilityCommand(const char* utilityName, bool all, const char* output, const char* workingDirectory, const std::vector<std::string>& depends, - const cmCustomCommandLines& commandLines) + const cmCustomCommandLines& commandLines, + bool escapeOldStyle) { // Create a target instance for this utility. cmTarget target; @@ -833,6 +839,7 @@ void cmMakefile::AddUtilityCommand(const char* utilityName, bool all, outputs.push_back(output); } cmCustomCommand cc(outputs, depends, commandLines, 0, workingDirectory); + cc.SetEscapeOldStyle(escapeOldStyle); target.GetPostBuildCommands().push_back(cc); // Add the target to the set of targets. |