View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010039CMakeCMakepublic2009-12-11 17:432013-05-10 10:55
ReporterGlenn Hughes 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.5Fixed in VersionCMake 2.8.5 
Summary0010039: Xcode gen only creates one level of group nesting
DescriptionI'm trying to use the source_group command with XCode, and its marginally working, but in a flaky sorta way.

The behavior I'm seeing is:
Groups in the form

 source_group( Name FILES ${source} )

Work OK, they add a top-level group to the current target's file list (i.e. Sources/Target/Name)

 source_group( Name/SubName FILES ${source} )

XCode treats this as a single name, in other words I get groups named
"Name/SubName"

 source_group( Name\SubName FILES ${source} )
and
 source_group( Name\\SubName FILES ${source} )

have the same behavior: The parent group name is dropped. I simply get
groups named SubName.

(Note in these examples I'm talking about the resulting text string, not the string literal in my CMakeLists file, which requires more backslashes to produce the same result, i.e. in CMake src Name\\\\SubName produces Name\\SubName)

In short, the most nested group you can create is
Source/Target/Group
You can not create
Source/Target/Group/SubGroup
TagsNo tags attached.
Attached Filespatch file icon 0001-Cmake-Xcode-Support-multiple-level-nesting-of-XCode-.patch [^] (5,020 bytes) 2011-02-15 08:37 [Show Content]
patch file icon 2-Cmake-Xcode-Support-multiple-level-nesting-of-XCode-.patch [^] (7,722 bytes) 2011-02-15 09:33 [Show Content]
patch file icon 3-code-Support-multiple-level-nesting-of-XCode-.patch [^] (8,446 bytes) 2011-02-15 13:34 [Show Content]
patch file icon 0002-XCode-Support-target-folders-on-XCode.patch [^] (2,579 bytes) 2011-02-20 09:12 [Show Content]

 Relationships
related to 0014133closedBrad King CMake creates duplicate target subfolders in Xcode project files 

  Notes
(0025431)
Johan Björk (reporter)
2011-02-15 08:37

Hi everyone,

Attached a patch which solves the issue. I don't know where a good place for tokenize() is, in the patch, the code was copied from cmSourceGroupCommand.cxx.

David, if you tell me where a good place for tokenize() is I can move both copies there.

/Johan
(0025434)
Johan Björk (reporter)
2011-02-15 09:33

Moved it to cmSystemTools.cxx.
(0025442)
Johan Björk (reporter)
2011-02-15 13:34

Latest patch just removes some codeduplication.
(0025526)
Johan Björk (reporter)
2011-02-20 09:12

While working on this, I noticed it would be trivial to add target Folder support. Attached patch is based of the previous patch and adds support for USE_FOLDERS.
(0026741)
Brad King (manager)
2011-06-07 11:41

I've applied Johan's patches. I split the first one into two commits:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d0a403fd [^]
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=59ed84e0 [^]
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eeeeca10 [^]
(0027764)
David Cole (manager)
2011-11-11 10:45

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

 Issue History
Date Modified Username Field Change
2009-12-11 17:43 Glenn Hughes New Issue
2010-12-14 17:36 David Cole Assigned To => David Cole
2010-12-14 17:36 David Cole Status new => assigned
2011-02-15 08:37 Johan Björk File Added: 0001-Cmake-Xcode-Support-multiple-level-nesting-of-XCode-.patch
2011-02-15 08:37 Johan Björk Note Added: 0025431
2011-02-15 09:33 Johan Björk File Added: 2-Cmake-Xcode-Support-multiple-level-nesting-of-XCode-.patch
2011-02-15 09:33 Johan Björk Note Added: 0025434
2011-02-15 13:34 Johan Björk File Added: 3-code-Support-multiple-level-nesting-of-XCode-.patch
2011-02-15 13:34 Johan Björk Note Added: 0025442
2011-02-20 09:12 Johan Björk File Added: 0002-XCode-Support-target-folders-on-XCode.patch
2011-02-20 09:12 Johan Björk Note Added: 0025526
2011-04-14 14:29 David Cole Target Version => CMake 2.8.5
2011-06-07 11:35 Brad King Assigned To David Cole => Brad King
2011-06-07 11:41 Brad King Note Added: 0026741
2011-06-08 15:45 Brad King Status assigned => resolved
2011-06-08 15:45 Brad King Fixed in Version => CMake 2.8.5
2011-06-08 15:45 Brad King Resolution open => fixed
2011-11-11 10:45 David Cole Note Added: 0027764
2011-11-11 10:45 David Cole Status resolved => closed
2013-05-10 10:55 Brad King Relationship added related to 0014133


Copyright © 2000 - 2018 MantisBT Team