Skip to main content

Helper functions with CMake

Project description

DOI

Build Status Build status PyPi versions PyPi Download stats

CMake Utils

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

  • C / C++
  • modern object-oriented Fortran 2008 / 2018
  • Python
  • Matlab / GNU Octave

It's important to use a recent CMake version to be effective and clean with CMake script.

Install CMake

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

python cmake_setup.py

Note: new projects should consider Meson instead of or in additon to CMake.

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.

GNU Octave

Octave from CMake via our FindOctave.cmake works well from CMake for unit tests, liboctave, etc. for Octave ≥ 3.8. We didn't try older versions of Octave.

Matlab

One-time setup: if you've never used mex before, you must setup the C++ compiler. It doesn't hurt to do this again if you're not sure. From Matlab:

mex -setup -client engine C++

Will ask you to select a compiler, or simply return:

ENGINE configured to use 'g++' for C++ language compilation.

CMake modules

To avoid duplication, we have several scientific computing CMake modules in scivision/fortran-libs repo.

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.3.2.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

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