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