C++ Project Template using conan and CMake
This is a CMake based C++ project template that uses the Conan C/C++ Package Manager to install/build the dependencies used. It can be used as starting point for C++ projects and includes:
- A Dummy google test unit test
- A Dummy BDD Style (Gherkin) feature test using Cucumber and Cucumber-cpp
- CMake targets to build, run tests and measure metrics.
Building the Project requires
- a recent Version of CMake (3.2.x). See CMake documentation for more information about building using CMake.
- Conan
- a recent C++ compiler supporting C++11 (tested on gcc 4.8, 4.9, 5.4, 6.2, clang 3.5)
The external dependencies are handles with Conan C/C++ Package Manager.
$ mkdir build && pushd build
$ conan install ..
$ cmake ..
$ popd
conan install
installs all dependencies and generates the files conanbuildinfo.txt and conanbuildinfo.cmake with all the paths and variables that you need to link with your dependencies.
Please refer to the Conan docu for more informations.
$ cmake --build build --target all --config Debug
$ cmake --build build --target run_unittests
$ cmake --build build --target run_feature_test
$ cmake --build build --target run_feature_test
$ cmake --build build --target run_wip_features
Start wireserver: >cmake --build build --target start_wireserver
and in folder tests/feature run cucumber: >cucumber features
or >cucumber -p wip features