Consider the following situation :
A code base consisting out of:
- many libraries
- many applications/executables
Assume organized like this
rootdir
|—executables
|—libraries
Where the executables contains a sub directory per application, and the libraries contains per directory a library (could be further divided in more hierarchical directories)
Every directory has a CMakeLists.txt, add_subdirectory() it child directories, until you reach a library directory (so no more hierarchical directories) which then does an add_library()
similar for the executables, bu tin the end they do an add_executable()
What would be the adviced amount of project() 's ?
Could it be a project per directory and per executable, of just 1 project at the top level, and consider the entire code base as the project out of which many executables and/or libraries could be built ?
kind regards