Skip to main content

A CLI tool for CMake wrapper.

Project description

cmakew

https://badge.fury.io/py/cmakew.svg https://img.shields.io/pypi/pyversions/cmakew.svg

Summary

A CLI tool for CMake and compiler wrapper.

Examples

Build googletest at Linux

$ cmakew googletest-release-1.8.0
[INFO] cmakew: -- The C compiler identification is GNU 6.2.1
-- The CXX compiler identification is GNU 6.2.1
-- 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: /root/.pyenv/shims/python (found version "2.7.12")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/github/build

[INFO] cmakew: Scanning dependencies of target gtest
Scanning dependencies of target gmock
Scanning dependencies of target gmock_main
[  9%] Building CXX object googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 18%] Building CXX object googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
[ 27%] Building CXX object googlemock/CMakeFiles/gmock.dir/__/googletest/src/gtest-all.cc.o
[ 36%] Building CXX object googlemock/CMakeFiles/gmock_main.dir/__/googletest/src/gtest-all.cc.o
[ 45%] Building CXX object googlemock/CMakeFiles/gmock_main.dir/src/gmock-all.cc.o
[ 54%] Linking CXX static library libgtest.a
[ 63%] Linking CXX static library libgmock.a
[ 72%] Building CXX object googlemock/CMakeFiles/gmock_main.dir/src/gmock_main.cc.o
[ 72%] Built target gtest
Scanning dependencies of target gtest_main
[ 72%] Built target gmock
[ 81%] Building CXX object googlemock/gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[ 90%] Linking CXX static library libgtest_main.a
[ 90%] Built target gtest_main
[100%] Linking CXX static library libgmock_main.a
[100%] Built target gmock_main

Output

$ # tree build/googlemock/ -L 2
build/googlemock/
├── CMakeFiles
│   ├── CMakeDirectoryInformation.cmake
│   ├── gmock.dir
│   ├── gmock_main.dir
│   └── progress.marks
├── CTestTestfile.cmake
├── Makefile
├── cmake_install.cmake
├── gtest
│   ├── CMakeFiles
│   ├── CTestTestfile.cmake
│   ├── Makefile
│   ├── cmake_install.cmake
│   ├── libgtest.a
│   └── libgtest_main.a
├── libgmock.a
└── libgmock_main.a

5 directories, 12 files

Installation

pip install cmakew

cmakew help

usage: cmakew [-h] [--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
  --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

Dependencies

Python 2.7+ or 3.3+

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

cmakew-0.0.4.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmakew-0.0.4-py2.py3-none-any.whl (12.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file cmakew-0.0.4.tar.gz.

File metadata

  • Download URL: cmakew-0.0.4.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cmakew-0.0.4.tar.gz
Algorithm Hash digest
SHA256 2cf63dcb36b02325c12d5529a75662ceaa9751909e311ebdf13372ae398bb7e9
MD5 babe6443b21135dbc911700323d6424a
BLAKE2b-256 07828efe7706fffc88c91b229bd7a8f18180c59aa74e17bb3a7b03884c9f9268

See more details on using hashes here.

File details

Details for the file cmakew-0.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for cmakew-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d577e310ca6b8c31d4328e7ffc829a69255b860a86a519a7c3f34b3e9b175661
MD5 7926124798bf8b29b08297d8a5231497
BLAKE2b-256 ad9e290ba3cc0e0298b6845f97b2ff7d8d1034aff35a836e4ab5e9090b39502f

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