Build systems and tooling

This part of the C++ course makes the build reproducible. A Makefile comes first: targets, prerequisites and the pattern rule that rebuilds only what changed. CMake generates the build, a target carries its includes and its language level, and CTest runs the tests the target holds. The part ends on a Debug, Release and sanitizer variant, an imported library found by find_package, and a static and a shared library linked into one program.

097 Make a first Makefile, targets, prerequisites, recipes and make that rebuilds only what changed Open 098 Make variables and pattern rules variables, automatic variables, a pattern rule for .cpp to .o and a clean target Open 099 CMake CMakeLists.txt, configure, build, the build directory and an executable target Open 100 CMake targets and libraries add_library, target_include_directories, target_compile_features and a test executable Open 101 CTest enable_testing, add_test, ctest output and a failing test that is reported Open 102 Debug, Release and sanitizer builds CMAKE_BUILD_TYPE, optimisation flags, assertions and a build with AddressSanitizer Open 103 find_package and linking libraries find_package(Threads), imported targets, target_link_libraries and a library that is not found Open 104 Static and shared libraries ar, a .so with -fPIC, the linker search path and a program that loads both Open

Lessons