CMake Project Structure - Simplify C++!
arne-mertz.de › 2018 › 06Jun 13, 2018 · CMake Project Structure Properties and Options Currently, the files of our little CMake project are all in the same directory. Sources for the main program, sources for the tests, the Catch header, the CMakeLists.txt – everything. I’ve written about structuring our code into directories, and today we’ll move our project in that direction.
Examples - CMake
https://cmake.org/examplesThere are three directories involved. The top level directory has two subdirectories called ./Demo and ./Hello. In the directory ./Hello, a library is built. In the directory ./Demo, an executable is built by linking to the library. A total of three CMakeLists.txt files are created: one for each directory.