summaryrefslogtreecommitdiffstats
path: root/Source/cmCustomCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCustomCommand.cxx')
-rw-r--r--Source/cmCustomCommand.cxx26
1 files changed, 6 insertions, 20 deletions
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index b672148..c161eb6 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -17,6 +17,7 @@
//----------------------------------------------------------------------------
cmCustomCommand::cmCustomCommand()
+ : Backtrace(NULL)
{
this->HaveComment = false;
this->EscapeOldStyle = true;
@@ -33,7 +34,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 +55,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;
}
@@ -78,20 +75,19 @@ cmCustomCommand::cmCustomCommand(cmMakefile const* mf,
WorkingDirectory(workingDirectory?workingDirectory:""),
EscapeAllowMakeVars(false),
EscapeOldStyle(true),
- Backtrace(new cmListFileBacktrace)
+ Backtrace(NULL)
{
this->EscapeOldStyle = true;
this->EscapeAllowMakeVars = false;
if(mf)
{
- mf->GetBacktrace(*this->Backtrace);
+ this->Backtrace = mf->GetBacktrace();
}
}
//----------------------------------------------------------------------------
cmCustomCommand::~cmCustomCommand()
{
- delete this->Backtrace;
}
//----------------------------------------------------------------------------
@@ -101,16 +97,6 @@ const std::vector<std::string>& cmCustomCommand::GetOutputs() const
}
//----------------------------------------------------------------------------
-const char* cmCustomCommand::GetWorkingDirectory() const
-{
- if(this->WorkingDirectory.size() == 0)
- {
- return 0;
- }
- return this->WorkingDirectory.c_str();
-}
-
-//----------------------------------------------------------------------------
const std::vector<std::string>& cmCustomCommand::GetDepends() const
{
return this->Depends;
@@ -176,7 +162,7 @@ void cmCustomCommand::SetEscapeAllowMakeVars(bool b)
//----------------------------------------------------------------------------
cmListFileBacktrace const& cmCustomCommand::GetBacktrace() const
{
- return *this->Backtrace;
+ return this->Backtrace;
}
//----------------------------------------------------------------------------