source_group with XCode?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

source_group with XCode?

Glenn Hughes
Hi again, I'm trying to use the source_group command with XCode, and
its marginally working, but in a flaky sorta way.
I was wondering what other people have any tips.

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

                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.

I guess or now I'll go with "/" in that it at least still represents
the folder structure, and it sounds like maybe its more compatible
with Visual Studio.
Anything else I should try?

Thanks!
Glenn
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: source_group with XCode?

Michael Jackson
> source_group( Name\\\\SubName FILES ${source} )
_________________________________________________________
Mike Jackson                  [hidden email]
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio

On Dec 11, 2009, at 3:45 PM, Glenn Hughes wrote:

> Hi again, I'm trying to use the source_group command with XCode, and
> its marginally working, but in a flaky sorta way.
> I was wondering what other people have any tips.
>
> 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
>
> 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.
>
> I guess or now I'll go with "/" in that it at least still represents
> the folder structure, and it sounds like maybe its more compatible
> with Visual Studio.
> Anything else I should try?
>
> Thanks!
> Glenn
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: source_group with XCode?

Michael Jackson
Ya, know you are right. I have another project that should have  
something like:

MXA/Common/IO/Private and I get "Common" and "Private" as subgroups of  
MXA, instead of a nice hierarchy. You may have found a bug. I am  
running CMake 2.6.4. Don't have 2.8 yet.

---
Mike Jackson                 www.bluequartz.net

On Dec 11, 2009, at 4:52 PM, Glenn Hughes wrote:

> I only see one level deep of nesting below the target level in your
> screen shot.
>
> Within the context of a target I seem to automatically get the group  
> structure
> /Sources/Target
>
> Then any additional groups I add are under Target. I can get one level
> of grouping under Target, i.e.
>
> /Sources/Target/SubFolder
>
> but not
>
> /Sources/Target/SubFolder/SubSubFolder
>
> Can you make
> Sources/ModelEditor/ModelEditor/SomeSubGroup/
> ?
>
> G
>
> On Fri, Dec 11, 2009 at 4:43 PM, Michael Jackson
> <[hidden email]> wrote:
>> You mean like this:
>>
>>
>>
>> _________________________________________________________
>> Mike Jackson                  [hidden email]
>> BlueQuartz Software                    www.bluequartz.net
>> Principal Software Engineer                  Dayton, Ohio
>>
>> On Dec 11, 2009, at 4:33 PM, Glenn Hughes wrote:
>>
>>> Like I said, that doesn't work (my examples were the expansion, not
>>> the script code).
>>> All you get is groups named SubName.
>>>
>>> G
>>
>>
>>

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: source_group with XCode?

Michael Jackson
In reply to this post by Michael Jackson
I just tested the same project with Visual Studio 2008 and CMake 2.6.4  
and in the generated solution file I do get the correct number of sub  
folders generated. I would say that there may be a bug with the XCode  
generator or XCode may not support the feature ?!?
--
Mike Jackson <www.bluequartz.net>

On Dec 11, 2009, at 4:52 PM, Glenn Hughes wrote:

> I only see one level deep of nesting below the target level in your
> screen shot.
>
> Within the context of a target I seem to automatically get the group  
> structure
> /Sources/Target
>
> Then any additional groups I add are under Target. I can get one level
> of grouping under Target, i.e.
>
> /Sources/Target/SubFolder
>
> but not
>
> /Sources/Target/SubFolder/SubSubFolder
>
> Can you make
> Sources/ModelEditor/ModelEditor/SomeSubGroup/
> ?
>
> G
>
> On Fri, Dec 11, 2009 at 4:43 PM, Michael Jackson
> <[hidden email]> wrote:
>> You mean like this:
>>
>>
>>
>> _________________________________________________________
>> Mike Jackson                  [hidden email]
>> BlueQuartz Software                    www.bluequartz.net
>> Principal Software Engineer                  Dayton, Ohio
>>
>> On Dec 11, 2009, at 4:33 PM, Glenn Hughes wrote:
>>
>>> Like I said, that doesn't work (my examples were the expansion, not
>>> the script code).
>>> All you get is groups named SubName.
>>>
>>> G
>>
>>
>>

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: source_group with XCode?

Michael Jackson
Post a bug to the bug tracker. Maybe someone will get to it.
--
Mike Jackson <www.bluequartz.net>

On Dec 11, 2009, at 5:26 PM, Glenn Hughes wrote:

> Xcode definitely supports it. I'm moving to CMake from a pure Xcode
> project, and we have some deeply nested folders. My guess is its a bug
> in the generator. I'm running 2.8 btw...
>
> Thanks for confirming this for me.
>
> G

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake