All commands are supposed to be run in a Ubuntu terminal
- Go to the example directory you want. For example,
cd cmake-example - Create a directory for the build if you didn't do it before:
mkdir build - Ask cmake to configure the project:
cmake -B build -S .After this, you will see some cmake config files in thebuildfolder. - Ask cmake to build the project:
cmake --build buildAfter this, you will see the executable program in thebuildfolder - Run the executable program. For example,
./build/CPTS_223_CMake_Example
If anything strange happens during the compilation, you can simply delete the build folder and see whether the problem is gone: rm -r build
Use an IDE such as CLion to open the example directory (the one contains the CMakeLists.txt) and run it in the IDE
- Open this file in this folder:
github/workflows/cmake.ymland follow the example to write your own GitHub action - Click the "Action" tag on this GitHub page and see the result of your GitHub action
- You can update the badge in this README file to show your Action status