summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index b581147..41a6371 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -1010,6 +1010,37 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
return activeConfigs;
}
+bool
+cmGlobalVisualStudio7Generator::IsDependedOn(const std::string& project,
+ cmTarget const* targetIn)
+{
+ // Get all local gens for this project
+ std::map<std::string, std::vector<cmLocalGenerator*> >::const_iterator it =
+ this->ProjectMap.find(project);
+ if (it == this->ProjectMap.end())
+ {
+ return false;
+ }
+
+ // loop over local gens and get the targets for each one
+ for(std::vector<cmLocalGenerator*>::const_iterator geIt = it->second.begin();
+ geIt != it->second.end(); ++geIt)
+ {
+ cmTargets const& targets = (*geIt)->GetMakefile()->GetTargets();
+ for (cmTargets::const_iterator l = targets.begin();
+ l != targets.end(); l++)
+ {
+ cmTarget const& target = l->second;
+ TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(target);
+ if(tgtdeps.count(targetIn))
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
//----------------------------------------------------------------------------
static cmVS7FlagTable cmVS7ExtraFlagTable[] =
{