3.7. CMake listfilesΒΆ

There are several places where CMake code can live:

  • CMakeLists.txt listfiles loaded by add_subdirectory command will help you to create source/binary tree. This is a skeleton of your project.
  • *.cmake modules help you to organize/reuse CMake code.
  • CMake scripts can be executed by cmake -P and help you to solve problems in cross-platform fashion without relying on system specific tools like bash or without introducing external tool dependency like Python.

Examples on GitHub