CLI tool for one-line installation of C++/CMake projects.

Related tags

CLI Tools cmakip
Overview

cmakip

When working on virtual environments, Python projects can be installed with a single command invocation, for example pip install --no-deps . . Instead for CMake/C++ projects it is necessary to manually run mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=... .

cmakip is a command line tool to simplify this step, i.e. the compilation and installation of C++/CMake projects when working on environments such as conda environments or Python's virtual environments, similarly to what pip permits to do with Python projects.

Installation

First of all, make sure that you are in a conda environment or a Python virtual environment, then you can install cmakip as:

pip install --no-deps git+https://github.com/ami-iit/cmakip"

Usage

Installation from a directory

cmakip can permit to quickly install a project in a directory, for example:

cd ~
git clone https://github.com/fmtlib/fmt
cd fmt
cmakip install .

This automatically creates a build_cmakip directory in the source folder and then installs it in the appropriate location:

Operating System Environment Type CMAKE_INSTALL_PREFIX
Linux&macOS Conda ${CONDA_PREFIX}
Windows Conda ${CONDA_PREFIX}\Library
Linux&macOS Python venv ${VIRTUAL_ENV}
Windows Python venv Not Supported

A project installed like that can be uninstalled like:

cd ~/fmt
cmakip uninstall .

Installation from a repo

cmakip can also be used to install CMake libraries from a repo:

cmake install git+https://github.com/fmtlib/fmt

This automatically clone the repo in ${CONDA_PREFIX}\src or ${VIRTUAL_ENV}\src, and then installs it.

A library installed like this can be uninstalled simply specifying the repo name:

cmakip uninstall fmt

FAQs

Does cmakip resolve dependencies?

No. In a sense, it is kind of equivalent to pip install --no-deps.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

BSD-3-Clause

You might also like...
[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

Unofficial Open Corporates CLI: OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unofficial open corporates python command line tool.
Unofficial Open Corporates CLI: OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unofficial open corporates python command line tool.

Unofficial Open Corporates CLI OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unoff

tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI.

Tox Server tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI. It responds to commands via ZeroMQ

Notion-cli-list-manager - A simple command-line tool for managing Notion databases

A simple command-line tool for managing Notion List databases. ✨

Spotify Offline is a command line tool that allows one to download Spotify playlists in MP3 format.

Spotify Offline v0.0.2 listen to your favorite spotify songs, offline Overview Spotify Offline (spotifyoffline) is a command line tool that allows one

A CLI for creating styled-components for React projects quickly

new-component Ian Cleary (iancleary) Description Welcome! This is a CLI for creating styled-components for React projects quickly. Note: I've rewrote

Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

Comments
  • Support installing multiple projects specified in a text file

    Support installing multiple projects specified in a text file

    pip supports installing projects from a requirements.txt file (see https://pip.pypa.io/en/stable/reference/requirements-file-format/). To quickly install multiple repos, it could make sense to support something similar in cmakip, for example support:

    cmakip install -r cmake_repos_to_install.txt
    

    where cmake_repos_to_install.txt is:

    git+https://github.com/fmtlib/[email protected]
    git+https://github.com/gabime/[email protected]
    git+https://gitlab.com/libeigen/[email protected]
    
    opened by traversaro 1
  • Permit to specify an automatic install prefix different from Conda or virtualenv prefixes

    Permit to specify an automatic install prefix different from Conda or virtualenv prefixes

    At the moment, cmakip only permits to automatically install projects when a Conda or virtualenv prefix is active. In the AMI lab (https://ami.iit.it/) a common practice widespread among the members is to have an instance of the https://github.com/robotology/robotology-superbuild "active" in the system, and install CMake project in the install directory of the "activated" robotology-superbuild. Probably it could make sense to support such a workflow.

    At the moment I can think of two ways of implement this:

      1. Make cmakip aware of the robotology-superbuild in particular, checking if ROBOTOLOGY_SUPERBUILD_INSTALL_PREFIX is defined
      1. Define a new environment variable observed by cmakip, called CMAKIP_INSTALL_PREFIX or similar, and define it in robotology-superbuild's setup.sh scripts.

    I like option 2. to decouple cmakip and robotology-superbuild .

    opened by traversaro 0
  • Permit to pass CMake options to cmakip

    Permit to pass CMake options to cmakip

    At the momement it is not possible to easily pass CMake option to the build created by cmakip. Ideally we would like to be able to do something like that:

    cmake install git+https://github.com/fmtlib/fmt -DFMT_MODULE:BOOL=ON
    
    opened by traversaro 0
Releases(v0.1.0)
Owner
Artificial and Mechanical Intelligence
Artificial and Mechanical Intelligence
Ssl-tool - A simple interactive CLI wrapper around openssl to make creation and installation of self-signed certs easy

What's this? A simple interactive CLI wrapper around openssl to make self-signin

Aniket Teredesai 9 May 17, 2022
Command line tool to automate transforming the effects of one color profile to another, possibly more standard one.

Finished rendering the frames of that animation, and now the colors look washed out and ugly? This terminal program will solve exactly that.

Eric Xue 1 Jan 26, 2022
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Rafael Torres 2 Dec 10, 2021
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

Shreyash Chavan 2 Apr 4, 2022
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

null 14 Sep 11, 2022
A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Stream your favorite shows straight from the command line.

A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Installation pip install -r requirements.txt It use

Jonardon Hazarika 17 Dec 11, 2022
CLI tool to develop StarkNet projects written in Cairo

⛵ Nile Navigate your StarkNet projects written in Cairo. Installation pip install cairo-nile Usage Install Cairo Use nile to install a given version o

Martín Triay 305 Dec 30, 2022
CLI tool to develop StarkNet projects written in Cairo

OpenZeppelin Nile ⛵ Navigate your StarkNet projects written in Cairo. Getting started Create a folder for your project and cd into it: mkdir myproject

OpenZeppelin 305 Dec 30, 2022
Proman is a simple tool for managing projects through cli.

proman proman is a project manager. It helps you manage your projects from a terminal. The features are listed below. Installation Step 1: Download or

Arjun Somvanshi 2 Dec 6, 2021
Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 29, 2022