DerThorsten / cpp_cookiecutter

A cookiecutter template for a modern C++ project with python bindings

Home Page:http://cpp-cookiecutter.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cpp Cookiecutter

Documentation Status https://travis-ci.org/DerThorsten/cpp_cookiecutter.svg?branch=master https://circleci.com/gh/DerThorsten/cpp_cookiecutter/tree/master.svg?style=svg https://dev.azure.com/derthorstenbeier/cpp_cookiecutter/_apis/build/status/DerThorsten.cpp_cookiecutter?branchName=master

Demo Project

Have a look at github.com/DerThorsten/cpptools, an unmodified example project created with this cpp_cookiecutter.

Features

Current features include:

Usage:

Install _cookiecutter

$ pip install cookiecutter

After installing cookiecutter, use the cpp-cookiecutter:

$ cookiecutter https://github.com/DerThorsten/cpp_cookiecutter

This cookiecutter is bet used in conjunction with conda: Assuming your package is named cpptools the following script shows the usage of the generated project cookiecutter on Linux/MacOS

cd cpptools
conda env create -f cpptools-dev-requirements.yml
source activate cpptools-dev-requirements
mkdir build
cd build
cmake ..
make -j2
make cpp-test
make python-test
cd examples
./hello_world
cd ..
cd benchmark
./benchmark_cpptools

On a windows machine this looks like:

cd cpptools
call activate cpptools-dev-requirements
mkdir build
cd build
cmake .. -G"Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release  ^
      -DDEPENDENCY_SEARCH_PREFIX="%CONDA_PREFIX%\Library" -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library"
call activate cpptools-dev-requirements
cmake --build . --target ALL_BUILD
cmake --build . --target python-test
cmake --build . --target cpp-test
cd cpptools
call activate cpptools-dev-requirements
mkdir build
cd build
cmake .. -G"Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release  ^
      -DDEPENDENCY_SEARCH_PREFIX="%CONDA_PREFIX%\Library" -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library"
call activate cpptools-dev-requirements
cmake --build . --target ALL_BUILD
cmake --build . --target python-test
cmake --build . --target cpp-test

About

A cookiecutter template for a modern C++ project with python bindings

http://cpp-cookiecutter.readthedocs.io

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:CMake 38.1%Language:C++ 14.9%Language:Batchfile 12.2%Language:Python 11.0%Language:Makefile 10.8%Language:Shell 9.1%Language:Dockerfile 2.6%Language:Jupyter Notebook 1.0%Language:HTML 0.2%