summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-04-29 14:11:24 (GMT)
committerBrad King <brad.king@kitware.com>2005-04-29 14:11:24 (GMT)
commit48702f8a8d5c44a7b5f5a848ac83efde3edbb469 (patch)
treec73a0fabdec6702598cbfedb7edfbea9998bf3f9 /Source/cmGlobalVisualStudio6Generator.cxx
parentcf5c2b7ae8a8613258c02a182eec24b09cdf8a2e (diff)
downloadCMake-48702f8a8d5c44a7b5f5a848ac83efde3edbb469.zip
CMake-48702f8a8d5c44a7b5f5a848ac83efde3edbb469.tar.gz
CMake-48702f8a8d5c44a7b5f5a848ac83efde3edbb469.tar.bz2
COMP: Converting INSTALL->ALL_BUILD dependency implementation to use the AddUtility method on a target. This significantly simplifies the implementation and removes warnings about hiding virtual functions.
Diffstat (limited to 'Source/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx36
1 files changed, 13 insertions, 23 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index f89a49c..6704c73 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -165,6 +165,17 @@ void cmGlobalVisualStudio6Generator::Generate()
AddUtilityCommand("INSTALL", false, no_output, no_depends,
cmake_command.c_str(),
"-DBUILD_TYPE=$(IntDir)", "-P", "cmake_install.cmake");
+
+ // Make the INSTALL target depend on ALL_BUILD unless the
+ // project says to not do so.
+ const char* noall =
+ gen[0]->GetMakefile()
+ ->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
+ if(!noall || cmSystemTools::IsOff(noall))
+ {
+ cmTarget* install = gen[0]->GetMakefile()->FindTarget("INSTALL");
+ install->AddUtility("ALL_BUILD");
+ }
}
}
@@ -267,7 +278,6 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout,
if ((l->second.GetType() != cmTarget::INSTALL_FILES)
&& (l->second.GetType() != cmTarget::INSTALL_PROGRAMS))
{
- const char* extra_depend = 0;
bool skip = false;
// skip ALL_BUILD and RUN_TESTS if they have already been added
if(l->first == "ALL_BUILD" )
@@ -291,16 +301,6 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout,
{
doneInstall = true;
}
-
- // Make the INSTALL target depend on ALL_BUILD unless the
- // project says to not do so.
- const char* noall =
- root->GetMakefile()
- ->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
- if(!noall || cmSystemTools::IsOff(noall))
- {
- extra_depend = "ALL_BUILD";
- }
}
if(l->first == "RUN_TESTS")
{
@@ -315,8 +315,7 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout,
}
if(!skip)
{
- this->WriteProject(fout, si->c_str(), dir.c_str(),l->second,
- extra_depend);
+ this->WriteProject(fout, si->c_str(), dir.c_str(),l->second);
}
++si;
}
@@ -366,8 +365,7 @@ void cmGlobalVisualStudio6Generator::OutputDSWFile()
void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout,
const char* dspname,
const char* dir,
- const cmTarget& target,
- const char* extra_depend)
+ const cmTarget& target)
{
fout << "#########################################################"
"######################\n\n";
@@ -401,14 +399,6 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout,
}
}
- // Add an extra dependency if specified.
- if(extra_depend)
- {
- fout << "Begin Project Dependency\n";
- fout << "Project_Dep_Name " << extra_depend << "\n";
- fout << "End Project Dependency\n";
- }
-
std::set<cmStdString>::const_iterator i, end;
// write utility dependencies.
i = target.GetUtilities().begin();