diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2014-11-05 21:37:52 +0100 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-11-14 11:55:09 -0500 |
commit | fe5d6e8c0f2e37bac0621a3b976d95c471891f38 (patch) | |
tree | 56d2a66bbf625ed8f3274baf3632aab2337dd6f1 /Source/cmAddCustomCommandCommand.cxx | |
parent | ad6ee426278ebaa9518af4573362a96b0544f4f7 (diff) | |
download | cmake-fe5d6e8c0f2e37bac0621a3b976d95c471891f38.tar.gz |
Add USES_TERMINAL option for custom commands
Teach the add_custom_command and add_custom_target commands a new
USES_TERMINAL option. Use it to tell the generator to give the command
direct access to the terminal if possible.
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r-- | Source/cmAddCustomCommandCommand.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 2d19610626..410f97878c 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -35,6 +35,7 @@ bool cmAddCustomCommandCommand std::vector<std::string> depends, outputs, output; bool verbatim = false; bool append = false; + bool uses_terminal = false; std::string implicit_depends_lang; cmCustomCommand::ImplicitDependsList implicit_depends; @@ -102,6 +103,10 @@ bool cmAddCustomCommandCommand { append = true; } + else if(copy == "USES_TERMINAL") + { + uses_terminal = true; + } else if(copy == "TARGET") { doing = doing_target; @@ -312,7 +317,7 @@ bool cmAddCustomCommandCommand this->Makefile->AddCustomCommandToTarget(target, no_depends, commandLines, cctype, comment, working.c_str(), - escapeOldStyle); + escapeOldStyle, uses_terminal); } else if(target.empty()) { @@ -321,7 +326,7 @@ bool cmAddCustomCommandCommand main_dependency, commandLines, comment, working.c_str(), false, - escapeOldStyle); + escapeOldStyle, uses_terminal); // Add implicit dependency scanning requests if any were given. if(!implicit_depends.empty()) @@ -346,6 +351,11 @@ bool cmAddCustomCommandCommand } } } + else if (uses_terminal) + { + this->SetError("USES_TERMINAL may not be used with SOURCE signatures"); + return false; + } else { bool issueMessage = true; |