summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.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/cmLocalUnixMakefileGenerator3.cxx
parent6fe45fe9c3348645a0fe145e1f32c487829cea64 (diff)
downloadCMake-347c5f4b46396e974ff164b44f23b37eef779138.zip
CMake-347c5f4b46396e974ff164b44f23b37eef779138.tar.gz
CMake-347c5f4b46396e974ff164b44f23b37eef779138.tar.bz2
ENH: add working directory support
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index b66e407..ebf8060 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2405,13 +2405,19 @@ cmLocalUnixMakefileGenerator3
cmSystemTools::SetForceUnixPaths(true);
}
}
-
commands1.push_back(cmd);
}
}
// push back the custom commands
- this->CreateCDCommand(commands1,m_Makefile->GetStartOutputDirectory(),
+ const char* dir =m_Makefile->GetStartOutputDirectory();
+ // if the command specified a working directory use it.
+ if(cc.GetWorkingDirectory())
+ {
+ dir = cc.GetWorkingDirectory();
+ }
+
+ this->CreateCDCommand(commands1, dir,
m_Makefile->GetHomeOutputDirectory());
commands.insert(commands.end(), commands1.begin(), commands1.end());
}