Assessments
This section is for answers to questions from all chapters.
Chapter 1, Kickstarting CMake
- cmake -S /path/to/source -B /path/to/build.
- cmake -build /path/to/build.
- ctest.
- cpack.
- Targets are logical units around which CMake organizes a build. They can be executables, libraries, or contain custom commands.
- Unlike variables, properties are attached to a specific object or scope.
- CMake presets are used to share working configurations for a build.
Chapter 2, Accessing CMake in the Best Ways
- Here are the answers:
- cmake –S . -B ./build -DCMAKE_CXX_COMPILER:STRING= "/usr/bin/clang++ "
- cmake –S . -B ./build -G "Ninja"
- cmake –S . -B ./build -DCMAKE_BUILD_FLAGS_DEBUG:STRING= "-Wall"
- The project previously configured in question 1 can be built ...
Get CMake Best Practices now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.