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.0.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.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cmakestrap-0.3.0.tar.gz
Algorithm Hash digest
SHA256 078fcc8cc966eb395fc6f7f7d7fe26aadc379703ca9188492e029dd0dc00e874
MD5 68951869844d7ceb0a9af351ca6dca7e
BLAKE2b-256 1d5d8820ffd24b6f12aeda0296be790d765c8eb4ecc5f85c66f3fdc87deea5ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmakestrap-0.3.0-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.4

File hashes

Hashes for cmakestrap-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 614eeb2dd4675cd85484a5a41252892442754fe2361122e53155c29946950544
MD5 1cff41f22019575efd0fefd970209489
BLAKE2b-256 0f1eac0ea0f0002b46a915c412876427ee96899218f8b0a7069e4c67ec1365e0

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