diff options
author | Brad King <brad.king@kitware.com> | 2005-04-29 10:11:24 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-04-29 10:11:24 -0400 |
commit | 48702f8a8d5c44a7b5f5a848ac83efde3edbb469 (patch) | |
tree | c73a0fabdec6702598cbfedb7edfbea9998bf3f9 /Source/cmGlobalVisualStudio6Generator.cxx | |
parent | cf5c2b7ae8a8613258c02a182eec24b09cdf8a2e (diff) | |
download | cmake-48702f8a8d5c44a7b5f5a848ac83efde3edbb469.tar.gz |
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.cxx | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index f89a49c29c..6704c7312d 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(); |