diff options
author | Brad King <brad.king@kitware.com> | 2005-04-28 20:21:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-04-28 20:21:28 (GMT) |
commit | 3b81a4329420f0cb2ea0f3e7a4662c903e1b3aa0 (patch) | |
tree | db6dd24c9e4d4d1a6504b63656d73d3039373a0c /Source/cmGlobalVisualStudio6Generator.cxx | |
parent | 3a81832bb3ae22f6251ab810fbd17a7ec57ff9bb (diff) | |
download | CMake-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/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio6Generator.cxx | 25 |
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(); |