CPP Cmake starter code
This is a starter repo for C++ projects with Cmake.
Dependencies
- 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
Build Instructions
- 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.txtfile - If you are using VScode, you can install CMake Tools extention to help build, run and debug the project read more here.
On this page
Contributors
MIT License
Created January 9, 2022
Updated January 9, 2022