This is a starter repo for C++ projects with Cmake.
- cmake >= 3.7
- make >= 4.1 (Linux, Mac), 3.81 (Windows)
- Linux: make is installed by default on most Linux distros
- Mac: install Xcode command line tools to get make
- Windows: Click here for installation instructions
- gcc/g++ >= 5.4
- Linux: gcc / g++ is installed by default on most Linux distros
- Mac: same deal as make - install Xcode command line tools
- Windows: MinGW
- Clone this repository.
- Create a build directory in the top level directory:
mkdir build && cd build
- Compile:
cmake .. && make
- Run it:
./main
. - You may add more dependencies and update project details in the
CMakeLists.txt
file - If you are using VScode, you can install CMake Tools extention to help build, run and debug the project read more here.