Skip to main content

Simpler CMake project initializer script for C++

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmakestrap-0.3.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmakestrap-0.3.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file cmakestrap-0.3.1.tar.gz.

File metadata

  • Download URL: cmakestrap-0.3.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for cmakestrap-0.3.1.tar.gz
Algorithm Hash digest
SHA256 d8119ba3ac69f11e4879534b84201d87940ec6fc55a8586e074e1ed9751c8c0d
MD5 69ed1370209a719a79f35103ec1cfa08
BLAKE2b-256 22553607836a8b91cdb44943ef3bd95028d0fed098b2c8c326764d2338bbb75d

See more details on using hashes here.

File details

Details for the file cmakestrap-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: cmakestrap-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for cmakestrap-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 898beefb76f67f45ce8b2b9f2740aa2cccc926200271b80873ac5a5cb610d526
MD5 cdf935fc1db5daebada593a7386bc936
BLAKE2b-256 1b1293f3f7bd7685dd32998e5ba128d5f6fcb10e67cf36c2ef3a015c195205c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page