Skip to content

gokulp01/minimal-cpp-cookiecutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Simple C++ Cookiecutter

This repository contains a simple C++ project template for Cookiecutter that I use for most of my C++ projects.


Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Features
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

This is a very simple kickstarter cookiecutter for cpp projects and research work for quick prototyping and implementations.

(back to top)

Built With

  • CMake
  • Catch
  • Cookiecutter

(back to top)

Features

  • Simple C++ project structure
  • CMake build system
  • Catch for unit tests
  • Cookiecutter for project creation
  • Git for version control
  • GitHub for hosting

Prerequisites

CMake

To install CMake on your system, follow these steps:

For macOS:

brew install cmake

For Ubuntu:

sudo apt-get update
sudo apt-get install cmake

For Windows:

Download and run the installer from the CMake official website.

Cookiecutter

To install Cookiecutter, you need Python installed on your system. Then, you can install Cookiecutter using pip:

pip install cookiecutter

(back to top)

Usage

To create a new C++ project using this template, follow these steps:

  1. Open your terminal.
  2. Navigate to the directory where you want to create your project.
  3. Run the following command:
    cookiecutter gh:gokulp01/minimal-cpp-cookiecutter
    
  4. Cookiecutter will prompt you to enter values for various options, such as the project name, project slug, author's name, etc. Input your desired values for these fields.
  5. Once you complete the prompts, Cookiecutter will create a new directory containing the scaffolded C++ project based on the values you provided.
  6. Navigate into your new project directory: cd your-project-slug - Replace your-project-slug with the project slug you provided during the setup.
  7. Now, you can begin working on your C++ project. The directory will contain a basic project structure, including source files, a CMake configuration file, and any additional boilerplate specified in your template.
  8. To build your project, you can use CMake as follows: mkdir build && cd build && cmake .. && make - This will compile your C++ project and generate executable files in the build directory.

By following these steps, you can quickly bootstrap a new C++ project using the simple cookie-cutter template. Your folder tree should look like this

├── CMakeLists.txt
├── bin
├── build
├── main.cpp
├── src
│   ├── myclass.cpp
│   └── myclass.hpp
└── tests
    ├── CMakeLists.txt
    ├── SmokeTests.cpp
    ├── bin
    ├── build
    └── catch.hpp

(back to top)

Roadmap

  • Add support for Travis CI
  • Add support for AppVeyor
  • Add support for Conan
  • Add support for Doxygen
  • Add support for Cppcheck

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Gokul Puthumanaillam - @twitter_handle - [email protected]/[email protected]

Website - gokulp01.github.io

(back to top)