View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007932CMakeCMakepublic2008-11-03 17:092012-01-02 15:56
Reportergoatboy160 
Assigned ToBill Hoffman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionCMake 2.8.5Fixed in VersionCMake 2.8.5 
Summary0007932: XCode Source Grouping doesn't allow for multiple levels of source groups
DescriptionIn my CMakeLists files I have something like this

set( SOURCES misc/foo.c misc/junk.c misc/stuff.c )
source_group( "source\\misc" FILES ${SOURCES} )
set( MAC_SOURCES misc/mac/fancy.c misc/mac/jobs.c )
source_group( "source\\misc\\mac" FILES ${MAC_SOURCES} )


These cmake files are shared between Windows and Mac, and the VS project is created properly with multiple directories reflecting the file system. However the XCode project creates two source groups "misc" and "mac" and the same level, and the mac directory should below the misc folder.
TagsNo tags attached.
Attached Filesdiff file icon group_source.diff [^] (3,450 bytes) 2008-11-06 13:45 [Show Content]
diff file icon group_source2.diff [^] (5,006 bytes) 2010-09-25 08:25 [Show Content]
diff file icon group_source3.diff [^] (5,864 bytes) 2010-10-09 07:12 [Show Content]

 Relationships
related to 0011244closedBrad King Using Xcode built-in variables as CMAKE_OSX_ARCHITECTURES 
has duplicate 0008535closedDavid Cole Nested source groups not supported for XCode 

  Notes
(0014052)
goatboy160 (reporter)
2008-11-06 13:45

Attaching a diff of the changes I made to my local copy of the XCodeGenerator to properly nest source groups.
(0017937)
Claus Höfele (reporter)
2009-10-04 00:06

Looks like the same issue as 0008535. Would be great if this issue could be fixed.
(0022288)
Claus Höfele (reporter)
2010-09-21 06:25

Nearly two years since this bug has been reported and still broken in 2.8.0.
(0022301)
Bill Hoffman (manager)
2010-09-21 14:20

This patch no longer cleanly goes into git master. If someone could update the patch I will push it into next.
(0022315)
Claus Höfele (reporter)
2010-09-22 00:58

I can try to fix this issue if goatboy160 isn't interested in this problem any more.

However, the Xcode generator seems broken in 2.8.1 and 2.8.2. When I generate a project file with these cmake versions, Xcode 3.2 shows the error "Unable to open project file." (That's why I'm still using 2.8.0.)

Bill: are you aware of this issue? Does the latest code in git fix this problem?

Until the project generation issue is fixed, I can't test the source code grouping.
(0022317)
Bill Hoffman (manager)
2010-09-22 10:40

What????

We have several dashboards and as far as I know CMake never had a problem 2.8.1 2.8.2 with Xcode!!!


Do you have a sample test that fails?
(0022323)
Claus Höfele (reporter)
2010-09-22 17:32

Bill: Can you please send your email address to claus at claushoefele dot com. I can send you a project that reproduces the problem, but I don't want to put the souce code in a public forum. (It's part of a larger project; I'll try to create a simple test case.)
(0022337)
Bill Hoffman (manager)
2010-09-23 12:01

OK, I reproduced your issue. And just as I went to fix it.... I found that it had been fixed on Monday! See the related bug that I added to this issue. That said, I still need the updated patch for the source group issue.
(0022345)
Claus Höfele (reporter)
2010-09-25 08:26

I updated the patch, see group_source2.diff.
(0022378)
Bill Hoffman (manager)
2010-09-28 14:40

OK, I just pushed the fix for this into next for CMake git, thanks!
(0022379)
Bill Hoffman (manager)
2010-09-28 18:16

OK, I may have to pull this patch, it causes Xcode to crash when loading files.

There is a test in CMake/Tests/SourceGroups:
# this is not really a test which can fail
# it is more an example with several source_group()
# commands.
# The created projects have to be loaded manually
# in Visual Studio/XCode/Eclipse/...
# to see whether the correct groups have been created.

However, the comment is not really right! It does fail with this patch.

It fails when you try to build with xcodebuild:

kitware@dashmacmini2 $ xcodebuild . ~/hoffman/My Tests/CMake-xcode/Tests/SourceGroups
zsh: 5703 segmentation fault xcodebuild .
kitware@dashmacmini2 $ ~/hoffman/My Tests/CMake-xcode/Tests/SourceGroups
(0022381)
Bill Hoffman (manager)
2010-09-29 08:58

The patch has been reverted. I am not going to put it back until someone can make the test pass with the patch. To run the tests do this:

mkdir build
cmake -GXcode ../path/to/cmake
cmake --build .
ctest


To run just that test do this:

ctest -R SourceGroups
(0022387)
Claus Höfele (reporter)
2010-09-29 19:50

I can reproduce the problem with the SourceGroups test. I'll look into it, but won't have time until mid October.
(0022460)
Claus Höfele (reporter)
2010-10-09 07:20
edited on: 2010-10-09 07:21

I attached an updated version that fixes the problem (group_source3.diff). Patch is against cmake sources from today.

The problem was related to a sub group with the same name as another group. I changed the indexing of the group names so that the full path to the group is now used as the key instead of the last part only.

I also now exclude the ALL_BUILD target in the source file view, which makes the project more readable. ALL_BUILD is still listed in the Target section.

Let me know if there's any problem.

(0026026)
Joé Dupuis (reporter)
2011-04-01 16:00

The CTest passed with success on the third patch ( group_source3.diff). Is there anything more to do before it can be pulled in the repo ?
(0027235)
Johan Björk (reporter)
2011-08-18 11:45

This is already fixed in 2.8.5
(0027237)
David Cole (manager)
2011-08-18 11:52

Thanks, Johan, for pointing out that this one is already fixed...
(0028129)
David Cole (manager)
2012-01-02 15:56

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

 Issue History
Date Modified Username Field Change
2008-11-03 17:09 goatboy160 New Issue
2008-11-06 13:45 goatboy160 Note Added: 0014052
2008-11-06 13:45 goatboy160 File Added: group_source.diff
2009-09-21 13:22 Bill Hoffman Status new => assigned
2009-09-21 13:22 Bill Hoffman Assigned To => Bill Hoffman
2009-10-04 00:06 Claus Höfele Note Added: 0017937
2010-09-21 06:25 Claus Höfele Note Added: 0022288
2010-09-21 14:20 Bill Hoffman Note Added: 0022301
2010-09-22 00:58 Claus Höfele Note Added: 0022315
2010-09-22 10:40 Bill Hoffman Note Added: 0022317
2010-09-22 17:32 Claus Höfele Note Added: 0022323
2010-09-23 12:00 Bill Hoffman Relationship added related to 0011244
2010-09-23 12:01 Bill Hoffman Note Added: 0022337
2010-09-25 08:25 Claus Höfele File Added: group_source2.diff
2010-09-25 08:26 Claus Höfele Note Added: 0022345
2010-09-28 14:40 Bill Hoffman Note Added: 0022378
2010-09-28 18:16 Bill Hoffman Note Added: 0022379
2010-09-29 08:58 Bill Hoffman Note Added: 0022381
2010-09-29 19:50 Claus Höfele Note Added: 0022387
2010-10-09 07:12 Claus Höfele File Added: group_source3.diff
2010-10-09 07:20 Claus Höfele Note Added: 0022460
2010-10-09 07:21 Claus Höfele Note Edited: 0022460
2011-04-01 16:00 Joé Dupuis Note Added: 0026026
2011-08-18 11:45 Johan Björk Note Added: 0027235
2011-08-18 11:52 David Cole Note Added: 0027237
2011-08-18 11:52 David Cole Status assigned => resolved
2011-08-18 11:52 David Cole Fixed in Version => CMake 2.8.5
2011-08-18 11:52 David Cole Resolution open => fixed
2011-08-18 12:01 David Cole Target Version => CMake 2.8.5
2011-08-18 12:05 David Cole Relationship added has duplicate 0008535
2012-01-02 15:56 David Cole Note Added: 0028129
2012-01-02 15:56 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team