summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.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/cmGlobalVisualStudio7Generator.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/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx44
1 files changed, 14 insertions, 30 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 9b3952e..7eb1272 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -197,9 +197,20 @@ void cmGlobalVisualStudio7Generator::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");
+ }
}
}
-
+
// add the Run Tests command
this->SetupTests();
@@ -432,21 +443,7 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
else if ((l->second.GetType() != cmTarget::INSTALL_FILES)
&& (l->second.GetType() != cmTarget::INSTALL_PROGRAMS))
{
- // 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);
+ this->WriteProjectDepends(fout, si->c_str(), dir.c_str(), l->second);
++si;
}
}
@@ -517,8 +514,7 @@ cmGlobalVisualStudio7Generator
::WriteProjectDepends(std::ostream& fout,
const char* dspname,
const char*,
- const cmTarget& target,
- const char* extra_depend)
+ const cmTarget& target)
{
int depcount = 0;
// insert Begin Project Dependency Project_Dep_Name project stuff here
@@ -555,18 +551,6 @@ cmGlobalVisualStudio7Generator
}
}
- // 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();