Commit 5fba44cf authored by Brad King's avatar Brad King
Browse files

VS: Move VS-only API out of cmGlobalGenerator

Move the IsDependedOn method to cmGlobalVisualStudio7Generator
since that is the only caller.
parent b041fc13
...@@ -1045,36 +1045,6 @@ void cmGlobalGenerator::ClearEnabledLanguages() ...@@ -1045,36 +1045,6 @@ void cmGlobalGenerator::ClearEnabledLanguages()
this->LanguageEnabled.clear(); this->LanguageEnabled.clear();
} }
bool cmGlobalGenerator::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;
}
void cmGlobalGenerator::Configure() void cmGlobalGenerator::Configure()
{ {
this->FirstTimeProgress = 0.0f; this->FirstTimeProgress = 0.0f;
......
...@@ -225,9 +225,6 @@ public: ...@@ -225,9 +225,6 @@ public:
that is a framework. */ that is a framework. */
bool NameResolvesToFramework(const std::string& libname) const; 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 ///! Find a local generator by its startdirectory
cmLocalGenerator* FindLocalGenerator(const std::string& start_dir) const; cmLocalGenerator* FindLocalGenerator(const std::string& start_dir) const;
......
...@@ -1010,6 +1010,37 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild( ...@@ -1010,6 +1010,37 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
return activeConfigs; 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[] = static cmVS7FlagTable cmVS7ExtraFlagTable[] =
{ {
......
...@@ -166,6 +166,7 @@ protected: ...@@ -166,6 +166,7 @@ protected:
std::set<std::string> IsPartOfDefaultBuild(const std::string& project, std::set<std::string> IsPartOfDefaultBuild(const std::string& project,
cmTarget const* target); cmTarget const* target);
bool IsDependedOn(const std::string& project, cmTarget const* target);
std::vector<std::string> Configurations; std::vector<std::string> Configurations;
std::map<std::string, std::string> GUIDMap; std::map<std::string, std::string> GUIDMap;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment