April 2020
Intermediate to advanced
412 pages
9h 58m
English
First, we install CMake to our build system. Once the installation is complete, we switch to the native environment to create CMakeLists.txt. This file contains high-level build instructions about the project's composition and properties.
We name our project hello, which creates an executable, called hello, from a source file named hello.cpp. Additionally, we specify the minimal version of CMake required to build our application.
After we have created the project definition, we can switch back to the build system shell and generate low-level build instructions by running make.
It is common practice to create a dedicated build directory to keep all our build artifacts. By doing this, the object files generated by a compiler ...