Merge topic 'target-dependencies-const'

95b3bb5 Restore GetTargetDirectDepends const return
This commit is contained in:
Brad King 2010-08-31 14:36:01 -04:00 committed by CMake Topic Stage
commit d2a65b5f40
3 changed files with 4 additions and 4 deletions

View File

@ -1487,7 +1487,7 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
// Add dependencies of the included target. An excluded
// target may still be included if it is a dependency of a
// non-excluded target.
TargetDependSet & tgtdeps = this->GetTargetDirectDepends(target);
TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(target);
for(TargetDependSet::const_iterator ti = tgtdeps.begin();
ti != tgtdeps.end(); ++ti)
{
@ -1879,7 +1879,7 @@ void cmGlobalGenerator::AppendDirectoryForConfig(const char*, const char*,
}
//----------------------------------------------------------------------------
cmGlobalGenerator::TargetDependSet &
cmGlobalGenerator::TargetDependSet const&
cmGlobalGenerator::GetTargetDirectDepends(cmTarget & target)
{
return this->TargetDependencies[&target];

View File

@ -238,7 +238,7 @@ public:
// what targets does the specified target depend on directly
// via a target_link_libraries or add_dependencies
TargetDependSet & GetTargetDirectDepends(cmTarget & target);
TargetDependSet const& GetTargetDirectDepends(cmTarget & target);
const std::map<cmStdString, std::vector<cmLocalGenerator*> >& GetProjectMap()
const {return this->ProjectMap;}

View File

@ -1422,7 +1422,7 @@ void cmVisualStudio10TargetGenerator::WriteEvent(
void cmVisualStudio10TargetGenerator::WriteProjectReferences()
{
cmGlobalGenerator::TargetDependSet& depends
cmGlobalGenerator::TargetDependSet const& depends
= this->GlobalGenerator->GetTargetDirectDepends(*this->Target);
this->WriteString("<ItemGroup>\n", 1);
for( cmGlobalGenerator::TargetDependSet::const_iterator i = depends.begin();