For now, the default build configuration in the XCode scheme is hardcoded in
cmXCodeScheme.cxx. For example, the build configuration for launch action(the “RUN” command in XCode) is “Debug”.
Sometimes, it’s not what the users wanted. For the project that I’m working on, I want the default build configuration for “RUN” is “RelWithDebInfo”. Since our project is a huge one, sometimes it took a long time for me to build then realized that I did not choose the right build configuration.
I think we can add a new
XCODE_SCHEME_DEFAULT_RUN_CONFIG property for users to set the default build configuration to what they want. I have created a branch to do some tests and it’s working well for me. If this is a meaningful addition to CMake, I would be more than happy to submit a merge request.