Code Monkey home page Code Monkey logo

cmkr's Introduction

cmkr

cmkr, pronounced "cmaker", is a modern build system based on CMake and TOML.

cmkr parses cmake.toml files and generates a modern, idiomatic CMakeLists.txt for you. A minimal example:

[project]
name = "cmkr_for_beginners"

[target.hello_world]
type = "executable"
sources = ["src/main.cpp"]

cmkr can bootstrap itself and you only need CMake and a C++ compiler to use it.

Getting started

To get started, run the following commands from your project directory:

curl https://raw.githubusercontent.com/build-cpp/cmkr/main/cmake/cmkr.cmake -o cmkr.cmake
cmake -P cmkr.cmake

After the bootstrapping process finishes, customize cmake.toml for your project and run CMake:

cmake -B build
cmake --build build

Once bootstrapped, cmkr does not introduce extra steps to your workflow. After modifying cmake.toml you simply build/configure your CMake project and cmkr will automatically regenerate CMakeLists.txt when necessary.

Note: The cmake.toml project file, generated CMakeLists.txt and cmkr.cmake bootstrapping script are all intended to be added to source control.

In CI environments the cmkr bootstrapping process is skipped, so there is no additional overhead in your pipelines.

Template repositories

Another way to get started is to use the cmkr_for_beginners template repository. Either open it in Gitpod, or clone the repository and run:

cmake -B build
cmake --build build

Check out the cmkr topic, the build-cpp organization or the tests for more examples and templates.

Command line

Optionally you can put a cmkr release in your PATH and use it as a utility from the command line:

Usage: cmkr [arguments]
arguments:
    init    [executable|library|shared|static|interface] Create a project.
    gen                                                  Generates CMakeLists.txt file.
    build   <extra cmake args>                           Run cmake and build.
    install                                              Run cmake --install.
    clean                                                Clean the build directory.
    help                                                 Show help.
    version                                              Current cmkr version.

Credits

cmkr's People

Contributors

anthonyprintup avatar cursey avatar darknessxk avatar gmh5225 avatar moalyousef avatar mrexodia avatar pmeerw avatar zehmatt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.