Make sure you have CMake installed in your system:
sudo apt install cmake g++ gcc
Build your code
mkdir build cmake .. make -j1
To run any executables:
cd build ./<executable>