From 5fba44cf41312a64b1cc661d4015ba16ac9f2af8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 12 Jun 2014 10:26:35 -0400 Subject: VS: Move VS-only API out of cmGlobalGenerator Move the IsDependedOn method to cmGlobalVisualStudio7Generator since that is the only caller. --- Source/cmGlobalGenerator.cxx | 30 ------------------------------ Source/cmGlobalGenerator.h | 3 --- Source/cmGlobalVisualStudio7Generator.cxx | 31 +++++++++++++++++++++++++++++++ Source/cmGlobalVisualStudio7Generator.h | 1 + 4 files changed, 32 insertions(+), 33 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 6c8be72..36932aa 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1045,36 +1045,6 @@ void cmGlobalGenerator::ClearEnabledLanguages() this->LanguageEnabled.clear(); } -bool cmGlobalGenerator::IsDependedOn(const std::string& project, - cmTarget const* targetIn) -{ - // Get all local gens for this project - std::map >::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::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; -} - void cmGlobalGenerator::Configure() { this->FirstTimeProgress = 0.0f; diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 67bd378..6403429 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -225,9 +225,6 @@ public: that is a framework. */ bool NameResolvesToFramework(const std::string& libname) const; - /** If check to see if the target is linked to by any other - target in the project */ - bool IsDependedOn(const std::string& project, cmTarget const* target); ///! Find a local generator by its startdirectory cmLocalGenerator* FindLocalGenerator(const std::string& start_dir) const; 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 >::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::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[] = { diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 1dc709d..399ec9f 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -166,6 +166,7 @@ protected: std::set IsPartOfDefaultBuild(const std::string& project, cmTarget const* target); + bool IsDependedOn(const std::string& project, cmTarget const* target); std::vector Configurations; std::map GUIDMap; -- cgit v0.12