summaryrefslogtreecommitdiff
path: root/Source/cmCustomCommand.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-05-23 14:59:11 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2014-06-05 12:44:18 -0400
commita08292059eba4fdded6643b225640ebf559b2dac (patch)
tree59ca961e323ccf3256667181311b86b75c1b3968 /Source/cmCustomCommand.cxx
parentefc205695de570c740285b38fbac701f77179ecb (diff)
downloadcmake-a08292059eba4fdded6643b225640ebf559b2dac.tar.gz
genex: remove the need for backtraces
Rather than making dummy backtraces and passing them around, just make backtraces optional.
Diffstat (limited to 'Source/cmCustomCommand.cxx')
-rw-r--r--Source/cmCustomCommand.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index 20908a5da3..ae702e5d7b 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -33,7 +33,7 @@ cmCustomCommand::cmCustomCommand(const cmCustomCommand& r):
WorkingDirectory(r.WorkingDirectory),
EscapeAllowMakeVars(r.EscapeAllowMakeVars),
EscapeOldStyle(r.EscapeOldStyle),
- Backtrace(new cmListFileBacktrace(*r.Backtrace))
+ Backtrace(r.Backtrace)
{
}
@@ -54,11 +54,7 @@ cmCustomCommand& cmCustomCommand::operator=(cmCustomCommand const& r)
this->EscapeAllowMakeVars = r.EscapeAllowMakeVars;
this->EscapeOldStyle = r.EscapeOldStyle;
this->ImplicitDepends = r.ImplicitDepends;
-
- cmsys::auto_ptr<cmListFileBacktrace>
- newBacktrace(new cmListFileBacktrace(*r.Backtrace));
- delete this->Backtrace;
- this->Backtrace = newBacktrace.release();
+ this->Backtrace = r.Backtrace;
return *this;
}
@@ -77,21 +73,19 @@ cmCustomCommand::cmCustomCommand(cmMakefile const* mf,
Comment(comment?comment:""),
WorkingDirectory(workingDirectory?workingDirectory:""),
EscapeAllowMakeVars(false),
- EscapeOldStyle(true),
- Backtrace(new cmListFileBacktrace)
+ EscapeOldStyle(true)
{
this->EscapeOldStyle = true;
this->EscapeAllowMakeVars = false;
if(mf)
{
- *this->Backtrace = mf->GetBacktrace();
+ this->Backtrace = mf->GetBacktrace();
}
}
//----------------------------------------------------------------------------
cmCustomCommand::~cmCustomCommand()
{
- delete this->Backtrace;
}
//----------------------------------------------------------------------------
@@ -166,7 +160,7 @@ void cmCustomCommand::SetEscapeAllowMakeVars(bool b)
//----------------------------------------------------------------------------
cmListFileBacktrace const& cmCustomCommand::GetBacktrace() const
{
- return *this->Backtrace;
+ return this->Backtrace;
}
//----------------------------------------------------------------------------