summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.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/cmLocalGenerator.cxx
parent6fe45fe9c3348645a0fe145e1f32c487829cea64 (diff)
downloadCMake-347c5f4b46396e974ff164b44f23b37eef779138.zip
CMake-347c5f4b46396e974ff164b44f23b37eef779138.tar.gz
CMake-347c5f4b46396e974ff164b44f23b37eef779138.tar.bz2
ENH: add working directory support
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index bd64dc9..5fd0477 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1749,10 +1749,18 @@ void cmLocalGenerator::AppendFlags(std::string& flags,
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConstructScript(const cmCustomCommandLines& commandLines,
+ const char* workingDirectory,
const char* newline)
+
{
// Store the script in a string.
std::string script;
+ if(workingDirectory)
+ {
+ script += "cd ";
+ script += this->Convert(workingDirectory, START_OUTPUT, SHELL);
+ script += newline;
+ }
// Write each command on a single line.
for(cmCustomCommandLines::const_iterator cl = commandLines.begin();