/tutor-cpp

Primary LanguageCMakeThe UnlicenseUnlicense

Initial CPP

Setting up a new C++ project usually requires more time than the endurance of ideas. Even more so for modern C++ projects, which requires a rigorous build-test-document-integrate cycle. This template aims to streamline the process of beginning a new C++ project.

Heavily inspired by cpp-best-practices's cmake_template and cppbestpractices.

Features

Features In-Progress

How do I use initial-cpp?

To setup a new C++ project from this template project, you will need to clone the master branch of this repository.

  1. In a new directory, clone this repository.
    $ git clone https://github.com/robertefry/initial-cpp MyProject
    

To add this build system to an already existing project, you will need to merge a version of initial-cpp into an appropriate local branch. Follow the steps below.

  1. Add the initial-cpp remote to your project, here we call it build.

    $ git remote add build https://github.com/robertefry/initial-cpp
    
  2. Fetch the version of initial-cpp you want to use, here we fetch the tag v2.2.0 as build-2.2.0.

    $ git fetch --no-tags build refs/tags/v2.2.0:refs/tags/build-2.2.0
    
  3. Finally, we merge this tag into the branch we have presently checked out.

    $ git merge --allow-unrelated-histories build-2.2.0
    
  4. (Optionally), we can push the build-2.2.0 tag to the project remote, here called origin.

    $ git push origin build-2.2.0
    

Finally, to configure initial-cpp for your project, you will need to search the top-level CMakeLists.txt file for "FIXME:" tags, and complete the tasks outlined.