I typically use (git) submodules into third party libraries I need for my projects. Most of the time, these third party libraries provide several targets, and for my current project, I have 8 submodules. This results in 87 targets which Visual Studio needs to load and unload, 87 schemas for Xcode to load an manage, etc etc.
As an example, SPIRV-Cross from the Khronos group generates at least 14 targets, but I only need the statically linked library. I do understand that this statically linked library depends on other things, but I never want to build them separately.
Furthermore, I never rebuild the third party libraries if I don’t do a clean build or change build type from Debug to RelWithDebInfo or back.
Is there a CMake-y way to either suppress or, preferably, remove, unnecessary targets?
You’ll have to forgive me if I come off as uninitiated, but even as an intermediate level cpp-programmer I find, at times, that CMake is difficult. Thank you.