summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-02-22 15:32:44 (GMT)
committerBrad King <brad.king@kitware.com>2005-02-22 15:32:44 (GMT)
commit39af9ee1e496db77849015541f687897ed819a56 (patch)
tree79bd7c1765408c80822dc9b87853bdac24704332 /Source/cmGlobalVisualStudio6Generator.cxx
parent4d30cb309cc0cd191e89a7969599b79dea111a08 (diff)
downloadCMake-39af9ee1e496db77849015541f687897ed819a56.zip
CMake-39af9ee1e496db77849015541f687897ed819a56.tar.gz
CMake-39af9ee1e496db77849015541f687897ed819a56.tar.bz2
ENH: Updated implementation of custom commands. Multiple command lines are now supported effectively allowing entire scripts to be written. Also removed extra variable expansions and cleaned up passing of commands through to the generators. The command and individual arguments are now kept separate all the way until the generator writes them out. This cleans up alot of escaping issues.
Diffstat (limited to 'Source/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx24
1 files changed, 15 insertions, 9 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 7dd412d..34b4620 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -169,8 +169,9 @@ cmLocalGenerator *cmGlobalVisualStudio6Generator::CreateLocalGenerator()
void cmGlobalVisualStudio6Generator::Generate()
{
// add a special target that depends on ALL projects for easy build
- // of one configuration only.
- std::vector<std::string> srcs;
+ // of one configuration only.
+ const char* no_output = 0;
+ std::vector<std::string> no_depends;
std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it)
{
@@ -179,12 +180,14 @@ void cmGlobalVisualStudio6Generator::Generate()
if(gen.size())
{
gen[0]->GetMakefile()->
- AddUtilityCommand("ALL_BUILD", "echo","\"Build all projects\"",false,srcs);
+ AddUtilityCommand("ALL_BUILD", false, no_output, no_depends,
+ "echo", "Build all projects");
std::string cmake_command =
m_LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND");
gen[0]->GetMakefile()->
- AddUtilityCommand("INSTALL", cmake_command.c_str(),
- "-DBUILD_TYPE=$(IntDir) -P cmake_install.cmake",false,srcs);
+ AddUtilityCommand("INSTALL", false, no_output, no_depends,
+ cmake_command.c_str(),
+ "-DBUILD_TYPE=$(IntDir)", "-P", "cmake_install.cmake");
}
}
@@ -277,8 +280,9 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout,
if (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0)
{
cmCustomCommand cc = l->second.GetPostBuildCommands()[0];
- std::string project = cc.GetCommand();
- std::string location = cc.GetArguments();
+ const cmCustomCommandLines& cmds = cc.GetCommandLines();
+ std::string project = cmds[0][0];
+ std::string location = cmds[0][1];
this->WriteExternalProject(fout, project.c_str(), location.c_str(), cc.GetDepends());
}
else
@@ -417,7 +421,8 @@ void cmGlobalVisualStudio6Generator::SetupTests()
// If the file doesn't exist, then ENABLE_TESTING hasn't been run
if (cmSystemTools::FileExists(fname.c_str()))
{
- std::vector<std::string> srcs;
+ const char* no_output = 0;
+ std::vector<std::string> no_depends;
std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it)
{
@@ -426,7 +431,8 @@ void cmGlobalVisualStudio6Generator::SetupTests()
if(gen.size())
{
gen[0]->GetMakefile()->
- AddUtilityCommand("RUN_TESTS", ctest.c_str(), "-C $(IntDir)",false,srcs);
+ AddUtilityCommand("RUN_TESTS", false, no_output, no_depends,
+ ctest.c_str(), "-C", "$(IntDir)");
}
}
}