summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-08 17:01:21 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-08 17:01:21 (GMT)
commitc6741363de141c0b4aa6bb214b7aea2b6aa2bc39 (patch)
treed80c1567c9c9e044f5d8d270a3c25f9020802c48
parent7a3ed4644baed51c6849ca290885e85b815443cd (diff)
downloadCMake-c6741363de141c0b4aa6bb214b7aea2b6aa2bc39.zip
CMake-c6741363de141c0b4aa6bb214b7aea2b6aa2bc39.tar.gz
CMake-c6741363de141c0b4aa6bb214b7aea2b6aa2bc39.tar.bz2
ENH: Enabled new WORKING_DIRECTORY option to ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET on VS 6 generator.
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx14
-rw-r--r--Source/cmLocalVisualStudio6Generator.h2
2 files changed, 7 insertions, 9 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 6f4551d..f3155f6 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -303,15 +303,13 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
target.GetPreBuildCommands().begin();
cr != target.GetPreBuildCommands().end(); ++cr)
{
- this->AddUtilityCommandHack(target, count++, depends,
- cr->GetCommandLines());
+ this->AddUtilityCommandHack(target, count++, depends, *cr);
}
for (std::vector<cmCustomCommand>::const_iterator cr =
target.GetPostBuildCommands().begin();
cr != target.GetPostBuildCommands().end(); ++cr)
{
- this->AddUtilityCommandHack(target, count++, depends,
- cr->GetCommandLines());
+ this->AddUtilityCommandHack(target, count++, depends, *cr);
}
}
@@ -503,7 +501,7 @@ void
cmLocalVisualStudio6Generator
::AddUtilityCommandHack(cmTarget& target, int count,
std::vector<std::string>& depends,
- const cmCustomCommandLines& commandLines)
+ const cmCustomCommand& origCommand)
{
// Create a fake output that forces the rule to run.
char* output = new char[(strlen(m_Makefile->GetStartOutputDirectory()) +
@@ -518,9 +516,9 @@ cmLocalVisualStudio6Generator
m_Makefile->AddCustomCommandToOutput(output,
depends,
no_main_dependency,
- commandLines,
- no_comment,
- no_working_directory);
+ origCommand.GetCommandLines(),
+ origCommand.GetComment(),
+ origCommand.GetWorkingDirectory());
// Replace the dependencies with the output of this rule so that the
// next rule added will run after this one.
diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h
index 035b516..6b8286c 100644
--- a/Source/cmLocalVisualStudio6Generator.h
+++ b/Source/cmLocalVisualStudio6Generator.h
@@ -89,7 +89,7 @@ private:
const char* flags);
void AddUtilityCommandHack(cmTarget& target, int count,
std::vector<std::string>& depends,
- const cmCustomCommandLines& commandLines);
+ const cmCustomCommand& origCommand);
void WriteGroup(const cmSourceGroup *sg, cmTarget target,
std::ostream &fout, const char *libName);
std::string CreateTargetRules(cmTarget &target,