summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-04-28 20:21:28 (GMT)
committerBrad King <brad.king@kitware.com>2005-04-28 20:21:28 (GMT)
commit3b81a4329420f0cb2ea0f3e7a4662c903e1b3aa0 (patch)
treedb6dd24c9e4d4d1a6504b63656d73d3039373a0c /Source/cmGlobalVisualStudio7Generator.cxx
parent3a81832bb3ae22f6251ab810fbd17a7ec57ff9bb (diff)
downloadCMake-3b81a4329420f0cb2ea0f3e7a4662c903e1b3aa0.zip
CMake-3b81a4329420f0cb2ea0f3e7a4662c903e1b3aa0.tar.gz
CMake-3b81a4329420f0cb2ea0f3e7a4662c903e1b3aa0.tar.bz2
ENH: Added dependency from INSTALL target to ALL_BUILD target so that targets build before being installed.
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx40
1 files changed, 34 insertions, 6 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 7172d7c..5dbc678 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -453,7 +453,21 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
else if ((l->second.GetType() != cmTarget::INSTALL_FILES)
&& (l->second.GetType() != cmTarget::INSTALL_PROGRAMS))
{
- this->WriteProjectDepends(fout, si->c_str(), dir.c_str(),l->second);
+ // Make the INSTALL target depend on ALL_BUILD unless the
+ // project says to not do so.
+ const char* extra_depend = 0;
+ if(l->first == "INSTALL")
+ {
+ const char* noall =
+ root->GetMakefile()
+ ->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
+ if(!noall || cmSystemTools::IsOff(noall))
+ {
+ extra_depend = "ALL_BUILD";
+ }
+ }
+ this->WriteProjectDepends(fout, si->c_str(), dir.c_str(), l->second,
+ extra_depend);
++si;
}
}
@@ -519,11 +533,13 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
// Write a dsp file into the SLN file,
// Note, that dependencies from executables to
// the libraries it uses are also done here
-void cmGlobalVisualStudio7Generator::WriteProjectDepends(std::ostream& fout,
- const char* dspname,
- const char* ,
- const cmTarget& target
- )
+void
+cmGlobalVisualStudio7Generator
+::WriteProjectDepends(std::ostream& fout,
+ const char* dspname,
+ const char*,
+ const cmTarget& target,
+ const char* extra_depend)
{
int depcount = 0;
// insert Begin Project Dependency Project_Dep_Name project stuff here
@@ -560,6 +576,18 @@ void cmGlobalVisualStudio7Generator::WriteProjectDepends(std::ostream& fout,
}
}
+ // Add the extra dependency if requested.
+ if(extra_depend)
+ {
+ std::string guid = this->GetGUID(extra_depend);
+ if(!guid.empty())
+ {
+ fout << "\t\t{" << this->GetGUID(dspname) << "}." << depcount << " = {"
+ << guid << "}\n";
+ depcount++;
+ }
+ }
+
std::set<cmStdString>::const_iterator i, end;
// write utility dependencies.
i = target.GetUtilities().begin();