diff options
author | Stephan Tolksdorf <st@quanttec.com> | 2013-12-02 14:09:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-12-02 14:09:22 (GMT) |
commit | 2dcb1dc9ca0302288cc931403557785d3c3667cf (patch) | |
tree | d89f10b8c9b116c76817b68142a4d7150c4901b0 /Source/cmGlobalXCodeGenerator.cxx | |
parent | b80ef72b4d8e76bf5912d6d59a749a2d94bb49b2 (diff) | |
download | CMake-2dcb1dc9ca0302288cc931403557785d3c3667cf.zip CMake-2dcb1dc9ca0302288cc931403557785d3c3667cf.tar.gz CMake-2dcb1dc9ca0302288cc931403557785d3c3667cf.tar.bz2 |
Xcode: Fix duplicate target subfolders (#14133)
Fix logic introduced by commit eeeeca10 (XCode: Support target folders
on XCode, 2011-02-20) to avoid duplicate subfolders. The problem was
that no slash was appended to the curr_tgt_folder string on the it !=
this->TargetGroup.end() path.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index be0459d..215d483 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3031,23 +3031,23 @@ cmXCodeObject* cmGlobalXCodeGenerator cmStdString curr_tgt_folder; for(std::vector<std::string>::size_type i = 0; i < tgt_folders.size();i++) { - curr_tgt_folder += tgt_folders[i]; - it = this->TargetGroup.find(curr_tgt_folder); - if(it == this->TargetGroup.end()) + if (i != 0) { - tgroup = this->CreatePBXGroup(tgroup,tgt_folders[i]); - this->TargetGroup[curr_tgt_folder] = tgroup; + curr_tgt_folder += "/"; } - else + curr_tgt_folder += tgt_folders[i]; + it = this->TargetGroup.find(curr_tgt_folder); + if(it != this->TargetGroup.end()) { tgroup = it->second; continue; } + tgroup = this->CreatePBXGroup(tgroup,tgt_folders[i]); + this->TargetGroup[curr_tgt_folder] = tgroup; if(i == 0) { this->SourcesGroupChildren->AddObject(tgroup); } - curr_tgt_folder += "/"; } } this->TargetGroup[target] = tgroup; |