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.2.0.tar.gz (8.8 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.2.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmakestrap-0.2.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for cmakestrap-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4f50582c920bfd1edf48fa6485ae39996b87bc99f7055bf058c4579e82ec6f43
MD5 b031e83fea666e2b089141547e2f50d7
BLAKE2b-256 4e477fd4eb04afb21b0394b893893a52cdb71dd62a3d3ef7c00470033b7c4111

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmakestrap-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for cmakestrap-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9419a75ee356b9477731e29e245aa6009333137e26138afdd9ec144aa7ec8ba
MD5 4573a3a6266ddb54f5761ba95c3d2763
BLAKE2b-256 ee798396ed387eccbdfdbc4bc7fdf2124e3175817d3eb89d56d49cec7c5031bc

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