Make it safe to call this method without creating duplicates.

This commit is contained in:
Stephen Kelly 2011-12-04 16:45:39 +01:00 committed by David Cole
parent edd5303949
commit 97a5faa858
1 changed files with 6 additions and 2 deletions

View File

@ -1378,8 +1378,12 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
// Store the automatic include paths. // Store the automatic include paths.
if(includeBinaryDir) if(includeBinaryDir)
{ {
dirs.push_back(this->Makefile->GetStartOutputDirectory()); if(emitted.find(
emitted.insert(this->Makefile->GetStartOutputDirectory()); this->Makefile->GetStartOutputDirectory()) == emitted.end())
{
dirs.push_back(this->Makefile->GetStartOutputDirectory());
emitted.insert(this->Makefile->GetStartOutputDirectory());
}
} }
if(includeSourceDir) if(includeSourceDir)
{ {