Giter Site home page Giter Site logo

cookiecutter-cpp's Introduction

Cookiecutter C++ package

Pure C++ package with Cookiecutter.

Package with

  • fmt - 6.0.0
  • spdlog - 1.4.2
  • gtest - 1.8.1

Directory

{{cookiecutter.project_slug}}/
├── CMakeLists.txt
├── conanfile.txt
├── include
│   └── {{cookiecutter.project_slug}}
│       └── function.h
├── LICENSE
├── README.md
├── src
│   ├── {{cookiecutter.project_slug}}
│   │   └── function.cpp
│   └── main.cpp
└── test
    └── test.cpp

Dependency

Install

$ sudo apt install cmake
$ sudo apt install python3.8  # Any python3.x
$ sudo apt install python3-pip

$ pip3 install cookiecutter --user
$ pip3 install conan --user

$ echo "export PATH=$PATH:$HOME/.local/bin" >> $HOME/.bashrc
$ echo "export PYTHONPATH=$PYTHONPATH:$HOME/.local/python3.8/site-packages" >> $HOME/.bashrc  # Check your python3 path

# If you are using GCC(G++) compiler >= 5.1, Conan will set the compiler.libcxx
# to the old ABI for backwards compatibility.
# You can change this with the following commands.
$ conan profile update settings.compiler.libcxx=libstdc++11 default

Quick start

# Project create
$ cookiecutter https://github.com/ppd0523/cookiecutter-cpp.git

# Build
$ cd cookiecutter-cpp
$ mkdir build && cd build
# conan install .. --build=fmt --build=spdlog --build=gtest
$ conan install .. --build=missing
$ cmake .. && make

# Execute
$ ./bin/main
$ ./bin/test

Trouble Shooting

  1. In case of Link error, check conan compiler option(libcxx).

cookiecutter-cpp's People

Contributors

ppd0523 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.