A template repo to quickly start cpp projects using conan package manager and CMake.
Inspired by ForgottenUmbrella's gist
- Change project name in
CMakeList.txt
. - Update dependencies in
conanfile.txt
.
Run
./setup.sh
or
mkdir build && cd build
conan install ..
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=1 # generates compile_commands.json
ln -s compile_commands.json ../compile_commands.json # link compile_commands.json to home dir
Note: Omit ln -s ...
for windows manually copy compile_commands (AFAIK ln is not supported on windows).
cd build
make -jX
X: number of CPU threads on your machine
cd build
conan install ..
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=1
Binary/app can be found in build/bin/
which will be same as your project name.