summaryrefslogtreecommitdiffstats
path: root/Source/cmCustomCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-02-08 15:58:36 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-02-08 15:58:36 (GMT)
commit347c5f4b46396e974ff164b44f23b37eef779138 (patch)
treee6457f6b3ce5ec7e54f3991e4e7912d2531f98b3 /Source/cmCustomCommand.cxx
parent6fe45fe9c3348645a0fe145e1f32c487829cea64 (diff)
downloadCMake-347c5f4b46396e974ff164b44f23b37eef779138.zip
CMake-347c5f4b46396e974ff164b44f23b37eef779138.tar.gz
CMake-347c5f4b46396e974ff164b44f23b37eef779138.tar.bz2
ENH: add working directory support
Diffstat (limited to 'Source/cmCustomCommand.cxx')
-rw-r--r--Source/cmCustomCommand.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index 8d794f7..ca52460 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -27,7 +27,8 @@ cmCustomCommand::cmCustomCommand(const cmCustomCommand& r):
m_Output(r.m_Output),
m_Depends(r.m_Depends),
m_CommandLines(r.m_CommandLines),
- m_Comment(r.m_Comment)
+ m_Comment(r.m_Comment),
+ m_WorkingDirectory(r.m_WorkingDirectory)
{
m_Used = false;
}
@@ -36,11 +37,12 @@ cmCustomCommand::cmCustomCommand(const cmCustomCommand& r):
cmCustomCommand::cmCustomCommand(const char* output,
const std::vector<std::string>& depends,
const cmCustomCommandLines& commandLines,
- const char* comment):
+ const char* comment, const char* workingDirectory):
m_Output(output?output:""),
m_Depends(depends),
m_CommandLines(commandLines),
- m_Comment(comment?comment:"")
+ m_Comment(comment?comment:""),
+ m_WorkingDirectory(workingDirectory?workingDirectory:"")
{
m_Used = false;
}
@@ -52,6 +54,16 @@ const char* cmCustomCommand::GetOutput() const
}
//----------------------------------------------------------------------------
+const char* cmCustomCommand::GetWorkingDirectory() const
+{
+ if(m_WorkingDirectory.size() == 0)
+ {
+ return 0;
+ }
+ return m_WorkingDirectory.c_str();
+}
+
+//----------------------------------------------------------------------------
const std::vector<std::string>& cmCustomCommand::GetDepends() const
{
return m_Depends;