[cmake-developers] [PATCH 0/2] Fix some minor annoyances in Xcode generator.

Alexander Chehovsky madfishtheone at gmail.com
Sun Feb 17 10:54:25 EST 2013


Here is illustration:

For the first patch, "Fixed nested source group handling in Xcode generator.":
* before: http://i.imgur.com/s3Lz7ji.png
* after: http://i.imgur.com/11Is2wP.png

I'm not sure how to best describe it in a commit message, but the fix
is to make code path for nested case build the group map key in the
same way as non-nested code path does. If you look at the start of
that function, you'll see variable s constructed as target + "/" +
sg->GetFullName(), and then s is used as a key for GroupNameMap
(immediately for early-out, and in the very end of the function, where
it creates a group for non-nested case). However, code path for nested
case did construct the key as cmtarget.GetName() + "/" + ..., which
was different (cmtarget,GetName() is just a target name, and not a
full path for the target folder), therefore two different group
folders were created in case of nested grouping. This patch makes the
behavior the same, thus eliminating the problem. Although that code
may benefit from some cleaning - there should be no real need for two
different code paths for this.


For the second patch, "Sort source files in Xcode generator.":
* before: http://i.imgur.com/WUhsQU7.png
* after: http://i.imgur.com/dG5LtDf.png

This one is really straightforward, and I don't even know what else to
add to commit message. Since Xcode doesn't sort the files on its own,
let's sort them in generator, to make navigation easier. Visual
Studio, QtCreator, kdevelop - they all display files sorted. But not
Xcode, so here's a fix.

On Sun, Feb 17, 2013 at 3:40 PM, Brad King <brad.king at kitware.com> wrote:
> On 2/16/2013 8:23 AM, Mad Fish wrote:
>> Mad Fish (2):
>>   Fixed nested source group handling in Xcode generator.
>>   Sort source files in Xcode generator.
>
> Thanks.  Please revise the commit messages to explain in
> more detail the before and after behaviors and how the
> patches achieve them.  For example in the first patch,
> explain why  "target" correct when cmtarget.GetName()
> is not.
>
> Thanks,
> -Brad



More information about the cmake-developers mailing list