You are totally right about changing between Debug and Profile. I often find myself in the exact same predicament. One trick I use regularly is to put:
#pragma optimize("", off)
at the top of a .cpp file. This will disable optimizations for this file only, and makes debugging a lot easier.
Note: With Uber files turned on, you might want to put…
#pragma optimize("", on)
at the bottom of the file, otherwise disabling optimizations will spill over into other files in that one Uber file (which you might not want). You still have to recompile which is a bit of a nuisance but it should be much faster if you want to debug something in Profile and don’t want to build the whole Debug configuration.
You’re right, Gems are linked dynamically. I think enabling and disabling Gems within a project is usually fairly fast but when changing projects (perhaps due to the build system), whatever cache that existed before can’t be used. I have to admit I’m not as familiar with this but I totally understand your frustration that (in theory at least) what you’re describing should be possible. There’s likely some fly in the ointment that’s contributing to more being rebuilt than should be.
The CMake team has made some huge strides and we hope we can share what we’ve been working on before too long.
Thanks for your understanding and I hope the optimize trick might come in handy!