Projects typically start with a single CMakeLists.txt file, but over time this file grows and in this recipe we will demonstrate one mechanism for splitting CMakeLists.txt up into smaller units. There are several motivations for splitting up CMakeLists.txt into modules that can be included in the main CMakeLists.txt or other modules:
- The main CMakeLists.txt is easier to read.
- CMake modules can be reused in other projects.
- In combination with functions, modules can help us limit the ...