The XCode generator sucks, can't we write a real new one?

The xcode generator is not generating xcode projects but only makefiles that xcode can use.
It has many issues and is not working well with the IDE at all. I18N and testing for example is still an everlasting problem, because they are very GUI integrated.

And it looks so different that asking for problems makes it compilated as magnitudes more people use Xcode without cmake.

I was able to write a special xcode generator with the well supported xcodeproj ruby gem and make it look 100% like a normal xcode project.

I would like to know if there is any interest in change and other people committing to help. Writing a new code generator for cmake seem to be total undocumented and hasn’t been done in more than 10 years so i fear the worst.

Another long term design change should be that CMake is not writing new projects all the time but only updating existing projects it generated, so changes can be done both from the IDE it generates for and from CMakeLists.txt I found this duality so much more helpful especially if you don’t want to wait a long time before new features are integrated, especially in the app lifecycle (testing, deployment) a lot is happening.

Huh? Using the XCode generator on my machine, it generates perfectly normal looking .xcodeproj files.

This is from a while ago but I’ve recently switch to CMake from another Xcode generator – @benthevining you may know ; )

I agree the way CMake generates Xcode projects out of the box takes a lot of modifications and improvements to make functional. Def the pros outweigh the cons but there are certain things that I just cannot get to work.

Xcodeproj helped tremendously but my project has updward of 50 - 60 schemes, and the way Xcode displays these when generated via CMake is utter chaos I can’t figure out

1 Like

I believe there is a target property XCODE_GENERATE_SCHEME or something similar – this can be set to false to prevent any unwanted schemes from cluttering up your project

1 Like

Yeah – unfortunately this isn’t working for me when setting it on the global or per project basis 0.o

To set it globally, use the CMAKE_XCODE_GENERATE_SCHEME variable. It must be set before you create the targets to have any effect.

Thanks Craig – I’m not sure exactly why it’s not working for me… – I’ll give it another shot and report back.

It’s not been a major concern as I actually need all of these schemes, the issue is that in Xcode there is no sort of rhyme or reason to their sort orders – I wonder if there’s a different way we could instruct Xcode to create schemes.

Just for reference – here’s my targets list:

However when it’s time actually select something to build (switching between schemes fairly often) – we’re forced to search through this for the needle in the haystack – (in follow up post due to limited forum permissions)

The needle in the haystack problem: