Skip to main content

Helper functions with CMake

Project description

CMake Utils

DOI Language grade: Python PyPi versions PyPi Download stats

Actions Status

CMake is a powerful and easy to use build system for a wide variety of languages including:

It's important to use a recent CMake version to be effective and clean with CMake script. This can be done via the Python package described below, or from CMake >= 2.8.12 by:

cmake -P install_cmake.cmake

if you need to compile CMake from source, for example on BSD or ARM 32-bit using existing CMake >= 3.13:

cmake -P build_cmake.cmake

Install

pip install cmakeutils

or

git clone https://github.com/scivision/cmakeutils
pip install -e cmakeutils

convert CMake hierarchy .dot to SVG or PNG

CMake plots dependency graphs for programs like:

cmake -B build --graphviz=gfx/block.dot

Then convert to PNG or SVG like:

python -m cmakeutils.graph ~/myprog/gfx

Install CMake binary

python -m cmakeutils.cmake_setup

takes only a minute to install binary and includes cmake-gui. It works for Linux, MacOS, native Windows and Windows Subsystem for Linux.

Ninja is recommended in general for use with CMake on Windows, Mac and Linux:

python -m cmakeutils.ninja_setup

Build CMake

CMake can be builts from source using either:

  • older version of CMake,
  • without CMake using the "bootstrap" method

The bootstrap method is only for Unix-like systems, while the CMake-based build can also be used on Windows. Any platform for which Kitware doesn't distribute binaries use this script, including IBM Power and ARM.

python -m cmakeutils.cmake_compile

This downloads the latest CMake release source and builds from scratch.

Requirements:

  • SSL library
  • C++ compiler
  • GNU Make or Ninja

Examples

  • Download with git using FetchContent
  • Download and extract ZIP
  • measure system parameters with CMake. Note Cygwin reports really small RAM and zero virtual memory.

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

cmakeutils-1.9.2.tar.gz (10.3 kB view details)

Uploaded Source

File details

Details for the file cmakeutils-1.9.2.tar.gz.

File metadata

  • Download URL: cmakeutils-1.9.2.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for cmakeutils-1.9.2.tar.gz
Algorithm Hash digest
SHA256 461bf62a105915b4cbbdf8e9d992cbf818f3771ecfe499740046ad114d1fe084
MD5 a1b4e87f6b6ab1fdc363c8c57377e164
BLAKE2b-256 63d70f5f9259898cc8efc754c4c745f2710e44d4aa0033fff6ec39a3056a4928

See more details on using hashes here.

Supported by

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