Skip to main content

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

Metadata

Release files for cmakestrap 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmakestrap 0.3.1
File Size Uploaded Provenance Actions
cmakestrap-0.3.1.tar.gz 10.5 kB Without provenance Details for cmakestrap-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cmakestrap 0.3.1
File Interpreter ABI Platform Actions
cmakestrap-0.3.1-py3-none-any.whl Python 3 none any Details for cmakestrap-0.3.1-py3-none-any.whl

Total release size: 26.0 kB

Release files / cmakestrap-0.3.1.tar.gz

Download URL cmakestrap-0.3.1.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d8119ba3ac69f11e4879534b84201d87940ec6fc55a8586e074e1ed9751c8c0d
BLAKE2b-256 checksum
How to use checksums
22553607836a8b91cdb44943ef3bd95028d0fed098b2c8c326764d2338bbb75d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / cmakestrap-0.3.1-py3-none-any.whl

Download URL cmakestrap-0.3.1-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
898beefb76f67f45ce8b2b9f2740aa2cccc926200271b80873ac5a5cb610d526
BLAKE2b-256 checksum
How to use checksums
1b1293f3f7bd7685dd32998e5ba128d5f6fcb10e67cf36c2ef3a015c195205c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for cmakestrap 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page