mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
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.
This commit is contained in:
committed by
Brad King
parent
ad6ee42627
commit
fe5d6e8c0f
@@ -22,6 +22,7 @@ cmCustomCommand::cmCustomCommand()
|
||||
this->HaveComment = false;
|
||||
this->EscapeOldStyle = true;
|
||||
this->EscapeAllowMakeVars = false;
|
||||
this->UsesTerminal = false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -34,7 +35,8 @@ cmCustomCommand::cmCustomCommand(const cmCustomCommand& r):
|
||||
WorkingDirectory(r.WorkingDirectory),
|
||||
EscapeAllowMakeVars(r.EscapeAllowMakeVars),
|
||||
EscapeOldStyle(r.EscapeOldStyle),
|
||||
Backtrace(r.Backtrace)
|
||||
Backtrace(r.Backtrace),
|
||||
UsesTerminal(r.UsesTerminal)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -56,6 +58,7 @@ cmCustomCommand& cmCustomCommand::operator=(cmCustomCommand const& r)
|
||||
this->EscapeOldStyle = r.EscapeOldStyle;
|
||||
this->ImplicitDepends = r.ImplicitDepends;
|
||||
this->Backtrace = r.Backtrace;
|
||||
this->UsesTerminal = r.UsesTerminal;
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -184,3 +187,15 @@ void cmCustomCommand::AppendImplicitDepends(ImplicitDependsList const& l)
|
||||
this->ImplicitDepends.insert(this->ImplicitDepends.end(),
|
||||
l.begin(), l.end());
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmCustomCommand::GetUsesTerminal() const
|
||||
{
|
||||
return this->UsesTerminal;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmCustomCommand::SetUsesTerminal(bool b)
|
||||
{
|
||||
this->UsesTerminal = b;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user