summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio8Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-04 16:37:53 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-04 16:37:53 (GMT)
commit524bb1e36e75b3e2057ebaae1b9ca281dd2d1b57 (patch)
treea53d8769c9d068c872c928eeeb6fb6a2f22b7ecb /Source/cmGlobalVisualStudio8Generator.cxx
parent7f9a0f508f707ebc9bb544c03114c668d437df6f (diff)
downloadCMake-524bb1e36e75b3e2057ebaae1b9ca281dd2d1b57.zip
CMake-524bb1e36e75b3e2057ebaae1b9ca281dd2d1b57.tar.gz
CMake-524bb1e36e75b3e2057ebaae1b9ca281dd2d1b57.tar.bz2
Simplify VS generator ZERO_CHECK dependency
The VS generators use a ZERO_CHECK target on which all other targets depend to check whether CMake needs to re-run. This commit simplifies the addition of a dependency on the target to all other targets. We also move addition of dependencies to the beginning of the Generate step. This allows the dependency on ZERO_CHECK to be included in the global inter-target dependency analysis.
Diffstat (limited to 'Source/cmGlobalVisualStudio8Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx43
1 files changed, 8 insertions, 35 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 17a625d..cdb8f4e 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -242,46 +242,19 @@ void cmGlobalVisualStudio8Generator::Generate()
}
}
- // Now perform the main generation.
- this->cmGlobalVisualStudio7Generator::Generate();
-}
-
-//----------------------------------------------------------------------------
-void cmGlobalVisualStudio8Generator::WriteSLNFile(
- std::ostream& fout, cmLocalGenerator* root,
- std::vector<cmLocalGenerator*>& generators)
-{
- // Make all targets depend on their respective project's build
- // system check target.
- unsigned int i;
- for(i = 0; i < generators.size(); ++i)
+ // All targets depend on the build-system check target.
+ for(std::map<cmStdString,cmTarget *>::const_iterator
+ ti = this->TotalTargets.begin();
+ ti != this->TotalTargets.end(); ++ti)
{
- if(this->IsExcluded(root, generators[i]))
+ if(ti->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET)
{
- continue;
- }
- cmMakefile* mf = generators[i]->GetMakefile();
- cmTargets& tgts = mf->GetTargets();
- for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
- {
- if(l->first == CMAKE_CHECK_BUILD_SYSTEM_TARGET)
- {
- for(unsigned int j = 0; j < generators.size(); ++j)
- {
- // Every target in all generators should depend on this target.
- cmMakefile* lmf = generators[j]->GetMakefile();
- cmTargets &atgts = lmf->GetTargets();
- for(cmTargets::iterator al = atgts.begin(); al != atgts.end(); ++al)
- {
- al->second.AddUtility(l->first.c_str());
- }
- }
- }
+ ti->second->AddUtility(CMAKE_CHECK_BUILD_SYSTEM_TARGET);
}
}
- // Now write the solution file.
- this->cmGlobalVisualStudio71Generator::WriteSLNFile(fout, root, generators);
+ // Now perform the main generation.
+ this->cmGlobalVisualStudio7Generator::Generate();
}
//----------------------------------------------------------------------------