summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2003-03-13 17:59:46 (GMT)
committerKen Martin <ken.martin@kitware.com>2003-03-13 17:59:46 (GMT)
commit2f927a538b14593de3f355bcd76b001231f69acb (patch)
treee6f8c0de2cf373cc4d712fa58c9b78aaddf1627d /Source/cmMakefile.cxx
parentce23446000ee5954d8810e70ea39165a8460e016 (diff)
downloadCMake-2f927a538b14593de3f355bcd76b001231f69acb.zip
CMake-2f927a538b14593de3f355bcd76b001231f69acb.tar.gz
CMake-2f927a538b14593de3f355bcd76b001231f69acb.tar.bz2
allow the same subdir to be added twice
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 8979cce..737e945 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)