Generating Xcode projects with group structure that matches the disk layout

Hi,

We have a patch on top of CMake that generates Xcode projects with files arranged in groups matching the disk layout of the folder structure rather than with all files in a flat list. This is how the files would be arranged if you were to drag and drop the folder structure into Xcode.

We are rebasing this patch onto the latest CMake version right now, and I was wondering if it is worth submitting as a pull request? It seems like personal preference, so if it was submitted in this way, we would put it behind an option flag similar to CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY .

Duncan

It seems like a reasonable feature to me (though I’m not an Xcode user).

Heads up: @gjasny @brad.king

The source_group command has a TREE mode for a similar use case. Can that achieve what you need?

How silly, I wish I’d know about that before patching the code. Thanks for letting me know, we’ll use that.