summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx25
1 files changed, 23 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index e392f55..917581c 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -290,6 +290,7 @@ 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" )
@@ -313,6 +314,16 @@ 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")
{
@@ -327,7 +338,8 @@ void cmGlobalVisualStudio6Generator::WriteDSWFile(std::ostream& fout,
}
if(!skip)
{
- this->WriteProject(fout, si->c_str(), dir.c_str(),l->second);
+ this->WriteProject(fout, si->c_str(), dir.c_str(),l->second,
+ extra_depend);
}
++si;
}
@@ -377,7 +389,8 @@ void cmGlobalVisualStudio6Generator::OutputDSWFile()
void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout,
const char* dspname,
const char* dir,
- const cmTarget& target)
+ const cmTarget& target,
+ const char* extra_depend)
{
fout << "#########################################################"
"######################\n\n";
@@ -411,6 +424,14 @@ 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();