diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-08-24 18:21:49 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-08-24 18:21:49 (GMT) |
commit | 9220e974017e34b53ba0650ec45c1a16566b6b88 (patch) | |
tree | 1e4ce1b543aa647e2ef7b79e2ab5c25dc1abf81c /Source/cmSourceGroupCommand.cxx | |
parent | 9a4e7ea742e7ff8e1110f3fe55e98340cb309aef (diff) | |
download | CMake-9220e974017e34b53ba0650ec45c1a16566b6b88.zip CMake-9220e974017e34b53ba0650ec45c1a16566b6b88.tar.gz CMake-9220e974017e34b53ba0650ec45c1a16566b6b88.tar.bz2 |
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.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx index a013cc9..145b7ed 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"); |