From 97a5faa85895ca77679d794788731cf76b8704ce Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 4 Dec 2011 16:45:39 +0100 Subject: [PATCH] Make it safe to call this method without creating duplicates. --- Source/cmLocalGenerator.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index b02fc364b2..961de37ae5 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1378,8 +1378,12 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector& dirs, // Store the automatic include paths. if(includeBinaryDir) { - dirs.push_back(this->Makefile->GetStartOutputDirectory()); - emitted.insert(this->Makefile->GetStartOutputDirectory()); + if(emitted.find( + this->Makefile->GetStartOutputDirectory()) == emitted.end()) + { + dirs.push_back(this->Makefile->GetStartOutputDirectory()); + emitted.insert(this->Makefile->GetStartOutputDirectory()); + } } if(includeSourceDir) {