View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014133CMakeCMakepublic2013-05-09 06:302014-06-02 08:37
ReporterStephan Tolksdorf 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformMacOSOSXOS Version10.8.3
Product VersionCMake 2.8.10.2 
Target VersionCMake 3.0Fixed in VersionCMake 3.0 
Summary0014133: CMake creates duplicate target subfolders in Xcode project files
DescriptionWhen using the Xcode generator, the following cmake script creates two identically named subfolders "sub" below the folder "top", although it should only create one folder "sub" for both targets. I've tested this with CMake version 2.8.11 RC4 and Xcode 4.6.2

add_executable(test1 test1.cpp)
SET_PROPERTY(TARGET test1 PROPERTY FOLDER "top/sub")

add_executable(test2 test2.cpp)
SET_PROPERTY(TARGET test2 PROPERTY FOLDER "top/sub")
Steps To ReproduceGenerate an Xcode project file for the attached test project.
TagsNo tags attached.
Attached Fileszip file icon FolderTest.zip [^] (1,026 bytes) 2013-05-09 06:30
patch file icon xcode-folder.patch [^] (1,219 bytes) 2013-11-28 08:58 [Show Content]

 Relationships
related to 0010039closedBrad King Xcode gen only creates one level of group nesting 

  Notes
(0033026)
Brad King (manager)
2013-05-10 10:53

This is likely a problem with the logic in cmGlobalXCodeGenerator::CreateOrGetPBXGroup:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmGlobalXCodeGenerator.cxx;hb=v2.8.10.2#l2811 [^]

This was likely introduced when the feature was first implemented for the Xcode generator:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eeeeca10 [^]
(0034611)
Stephan Tolksdorf (reporter)
2013-11-28 09:02

I've attached a patch that fixes the issue. The problem was that no slash was appended to the curr_tgt_folder string on the it != this->TargetGroup.end() path.
(0034668)
Brad King (manager)
2013-12-02 09:58

Applied, thanks:

Xcode: Fix duplicate target subfolders
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2dcb1dc9 [^]
(0036045)
Robert Maynard (manager)
2014-06-02 08:37

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-05-09 06:30 Stephan Tolksdorf New Issue
2013-05-09 06:30 Stephan Tolksdorf File Added: FolderTest.zip
2013-05-10 10:53 Brad King Note Added: 0033026
2013-05-10 10:53 Brad King Status new => backlog
2013-05-10 10:55 Brad King Relationship added related to 0010039
2013-11-28 08:58 Stephan Tolksdorf File Added: xcode-folder.patch
2013-11-28 09:02 Stephan Tolksdorf Note Added: 0034611
2013-12-02 09:58 Brad King Note Added: 0034668
2013-12-02 09:58 Brad King Assigned To => Brad King
2013-12-02 09:58 Brad King Status backlog => resolved
2013-12-02 09:58 Brad King Resolution open => fixed
2013-12-02 09:58 Brad King Fixed in Version => CMake 3.0
2013-12-02 09:58 Brad King Target Version => CMake 3.0
2014-06-02 08:37 Robert Maynard Note Added: 0036045
2014-06-02 08:37 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team