I have a large-ish codebase which builds several dozen libaries and several executables.
The codebase is broken down hierarchically and libraries are build at pretty muc
If the libraries are truly independent projects then it makes sense to use the project
command. However if they are not I would instead just add them as subdirectories in your root CmakeLists.txt
. You can use the variables CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR if you need to know the directories that are currently being processed.