diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 708bb8600..7bd98e61d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1291,7 +1291,11 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap() // target may still be included if it is a dependency of a // non-excluded target. TargetDependSet const& tgtdeps = this->GetTargetDepends(target); - targetSet.insert(tgtdeps.begin(), tgtdeps.end()); + for(TargetDependSet::const_iterator ti = tgtdeps.begin(); + ti != tgtdeps.end(); ++ti) + { + targetSet.insert(*ti); + } } } }