From 2f927a538b14593de3f355bcd76b001231f69acb Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Thu, 13 Mar 2003 12:59:46 -0500 Subject: [PATCH] allow the same subdir to be added twice --- Source/cmMakefile.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8979cce98..737e945f3 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -570,7 +570,12 @@ void cmMakefile::AddLinkDirectory(const char* dir) void cmMakefile::AddSubDirectory(const char* sub) { - m_SubDirectories.push_back(sub); + // make sure it isn't already there + if (std::find(m_SubDirectories.begin(), + m_SubDirectories.end(), sub) == m_SubDirectories.end()) + { + m_SubDirectories.push_back(sub); + } } void cmMakefile::AddIncludeDirectory(const char* inc, bool before)