Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

mrizaln/cmakestrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmakestrap

Simpler CMake project initializer script for C++ (with Conan).

Motivation

There are many project initializer script for C++ with CMake, the most famous one is cmake-init. Unfortunately, it generates too much files for my liking. Looking at this issue, that has been up for 2 years, it seems that the author does not have the time to provide an option to generate a simpler, thinner, project structure. This script is an attempt to provide that.

Installation

cmakestrap is available from PyPI:

pip install --user cmakestrap

Dependencies

  • Python 3.12+
  • CMake 3.16+ (might need higher version for newer C++ features)
  • Conan 2 (for dependency management)

Features

This script provides a simple way to bootstrap a C++ project with CMake (build system) and Conan (dependency management). You can generate projects in 3 mode:

  • Executable mode (default): generate a traditional C++ project structure with headers and such.
  • Library mode: generate a header only library project (C++20).
  • Modules mode: generate a CMake module project (requires CMake 3.28+ and supported compilers).

Initializing a simple hello world project:

cmakestrap hello

To see the available options, run the script with the -h flag:

cmakestrap -h

About

Simpler CMake project initializer script for C++

Resources

License

Stars

Watchers

Forks

Packages

No packages published