[TOC] Including Small Projects Including Small Projects This is where a good Git system plus CMake shines. You might not be able to solve all the world’s problems, but this is p...
[TOC] Git Submodule MethodBonus: Git version number Git Submodule Method If you want to add a Git repository on the same service (GitHub, GitLab, BitBucket, etc), the following ...
[TOC] An Introduction to Modern CMakeWhy do I need a good build system?Why must the answer be CMake?Why use a Modern CMake?Other sourcesCredits An Introduction to Modern CMake P...
[TOC] Running CMakeBuilding a project From the build directory (pick one) From the source directory (pick one)Picking a compilerPicking a generatorSetting optionsVerbose and parti...
[TOC] Do’s and Don’tsCMake AntipatternsCMake Patterns Do’s and Don’ts CMake Antipatterns The next two lists are heavily based on the excellent gist Effective Modern CMake. That...
[TOC] FetchContent (CMake 3.11+) FetchContent (CMake 3.11+) Often, you would like to do your download of data or packages as part of the configure instead of the build. This was...
[TOC] TestingGeneral Testing InformationBuilding as part of a testTesting Frameworks Testing General Testing Information In your main CMakeLists.txt you need to add the followi...
[TOC] GoogleTestSubmodule method (preferred)Download methodFetchContent: CMake 3.11 GoogleTest Submodule method (preferred) To use this method, just checkout GoogleTest as a su...
[TOC] CatchVendoringDirect inclusion Catch Catch and Catch2 (C++11 only version) are powerful, idomatic testing solutions similar in philosophy to PyTest for Python. To use Catc...