In this file, we explain how to build your code for the Linux target.
We see two ways to build
- CLI ( Command Line Interface )
- VS Code ( Visual Studio Code )
cmake -B build -S . -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
cmake --build build --target all
To configure the project on VS Code, click the CMake tool extension, and then click the "Select a Kit" button in the "Configure" group.
In the pull down menu, select the "GCC XX.YY.Z x86_64-linux-gnu". Then, VS Code will start the CMake configuration.
Finally, click the "Build" button in the status bar.
From the command line, run the following command :
build/src/app
From the VS Code, click the run (▷) button to run the program.
From the command line, run the following command :
ctest --test-dir build
From the VS Code, click the Test extension, and then run.