summaryrefslogtreecommitdiff
path: root/Source/cmSourceGroupCommand.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-08-24 14:21:49 -0400
committerAlexander Neundorf <neundorf@kde.org>2007-08-24 14:21:49 -0400
commit9220e974017e34b53ba0650ec45c1a16566b6b88 (patch)
tree1e4ce1b543aa647e2ef7b79e2ab5c25dc1abf81c /Source/cmSourceGroupCommand.cxx
parent9a4e7ea742e7ff8e1110f3fe55e98340cb309aef (diff)
downloadcmake-9220e974017e34b53ba0650ec45c1a16566b6b88.tar.gz
BUG: fix #4057 (which had several duplicates): handle recursivew source groups better, i.e. multiple sourcegroups with the same end component work now
Alex
Diffstat (limited to 'Source/cmSourceGroupCommand.cxx')
-rw-r--r--Source/cmSourceGroupCommand.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx
index a013cc9177..145b7ede25 100644
--- a/Source/cmSourceGroupCommand.cxx
+++ b/Source/cmSourceGroupCommand.cxx
@@ -66,16 +66,13 @@ bool cmSourceGroupCommand::InitialPass(std::vector<std::string> const& args)
const char *parent = NULL;
cmSourceGroup* sg = NULL;
- for(unsigned int i=0;i<folders.size();++i)
+ sg = this->Makefile->GetSourceGroup(folders);
+ if(!sg)
{
- sg = this->Makefile->GetSourceGroup(folders[i].c_str());
- if(!sg)
- {
- this->Makefile->AddSourceGroup(folders[i].c_str(), 0, parent);
- }
- sg = this->Makefile->GetSourceGroup(folders[i].c_str());
- parent = folders[i].c_str();
+ this->Makefile->AddSourceGroup(folders);
+ sg = this->Makefile->GetSourceGroup(folders);
}
+
if(!sg)
{
this->SetError("Could not create or find source group");