Skip to main content

Summary

cmakew is a CMake wrapper CLI tool.

PyPI package version Supported Python versions

Examples

Build googletest at Linux

$ wget -O - https://github.com/google/googletest/archive/release-1.8.1.tar.gz | tar zxf -
$ cmakew googletest-release-1.8.1/
[INFO] cmakew: -- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/toor/.pyenv/versions/3.7.0/bin/python (found version "3.7")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/github/build

[INFO] cmakew: Scanning dependencies of target gtest
[ 12%] Building CXX object googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 25%] Linking CXX static library libgtestd.a
[ 25%] Built target gtest
Scanning dependencies of target gtest_main
[ 37%] Building CXX object googlemock/gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
Scanning dependencies of target gmock
[ 50%] Building CXX object googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
[ 62%] Linking CXX static library libgtest_maind.a
[ 62%] Built target gtest_main
[ 75%] Linking CXX static library libgmockd.a
[ 75%] Built target gmock
Scanning dependencies of target gmock_main
[ 87%] Building CXX object googlemock/CMakeFiles/gmock_main.dir/src/gmock_main.cc.o
[100%] Linking CXX static library libgmock_maind.a
[100%] Built target gmock_main

Output

$ tree build/googlemock/ -L 2
build/googlemock/
├── CMakeFiles
│   ├── CMakeDirectoryInformation.cmake
│   ├── gmock.dir
│   ├── gmock_main.dir
│   └── progress.marks
├── cmake_install.cmake
├── CTestTestfile.cmake
├── gtest
│   ├── CMakeFiles
│   ├── cmake_install.cmake
│   ├── CTestTestfile.cmake
│   ├── generated
│   ├── libgtestd.a
│   ├── libgtest_maind.a
│   └── Makefile
├── libgmockd.a
├── libgmock_maind.a
└── Makefile

6 directories, 12 files

Installation

Install from PyPI

pip install cmakew

Install from PPA (for Ubuntu)

sudo add-apt-repository ppa:thombashi/ppa
sudo apt update
sudo apt install cmakew

cmakew help

usage: cmakew [-h] [-V] [--build-dir BUILD_DIR]
              [--action {cmake,recmake,clean,build,rebuild}]
              [--cmake-options CMAKE_OPTIONS] [--build-type {Debug,Release}]
              [--generator GENERATOR] [--debug | --quiet]
              SOURCE_DIR_PATH

A CLI tool for CMake and compiler wrapper.

positional arguments:
  SOURCE_DIR_PATH       relative path to the source directory.

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --debug               for debug print.
  --quiet               suppress execution log messages.

Directory Options:
  --build-dir BUILD_DIR
                        relative path to the build output directory (defaults
                        to 'build').

Build Options:
  --action {cmake,recmake,clean,build,rebuild}
                        cmake: execute CMake and exit. clean: delete existing
                        build directory and exit. recmake: delete existing
                        CMakeCache and execute CMake after that. build:
                        execute MSBuild to Visual Studio solution files that
                        created by cmake. rebuild: delete existing build
                        directory and execute CMake and MSBuild after that.
                        defaults to 'build'.

CMake Options:
  --cmake-options CMAKE_OPTIONS
                        path to the CMake options file. use "{key :value,
                        ...}" to set specific parameters. defaults to
                        cmake_options.json.
  --build-type {Debug,Release}
                        defaults to Debug.
  --generator GENERATOR
                        generator that passes to cmake. the default value
                        decided by execution platform: (a) if executed at
                        Windows and Visual Studio is installed in C: or D:
                        drive, cmakew pass 'Visual Studio NN' as a generator
                        to cmake. (b) "Unix Makefiles" otherwise

Issue tracker: https://github.com/thombashi/cmakew/issues

Dependencies

Python 2.7+ or 3.5+

Metadata

Release files for cmakew 0.2.0

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

Source distribution (sdist)

Source distribution for cmakew 0.2.0
File Size Uploaded
cmakew-0.2.0.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cmakew 0.2.0
File Interpreter ABI Platform
cmakew-0.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 23.2 kB

Release files / cmakew-0.2.0.tar.gz

Download URL cmakew-0.2.0.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e18a968f7f254a13ae47911538c874e2d9877c0bf7507aa0cdcf1a66d907d376
BLAKE2b-256 checksum
How to use checksums
0f5a5de65e6183f1d4958848b21dc1fda7a229dc6b315383d55923f24fb3acdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release files / cmakew-0.2.0-py2.py3-none-any.whl

Download URL cmakew-0.2.0-py2.py3-none-any.whl
Size 11.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d12da53b43b6fca00d6658c52180d048e6b32bc2ed10771baee9e690f666273d
BLAKE2b-256 checksum
How to use checksums
6b7c976622662f0f3ec43c07da71b081462de577e38452b3b0a10ecedb4fc8f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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