You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Go to file
Anthony Printup b24a0a2fdc
test(relative-paths): Make `link-libraries` conditional to the Windows platform
1 year ago
.github Add .editorconfig and linting 1 year ago
cmake Bump to 0.2.25 1 year ago
docs Add a 'Compiler flags' example to the documentation 1 year ago
include Add .editorconfig and linting 1 year ago
src fix(relative-paths): Prevent processing paths which may contain CMake macros, added a check to see if the library that's being linked exists on disk 1 year ago
tests test(relative-paths): Make `link-libraries` conditional to the Windows platform 1 year ago
third_party Add workflow for checking clang-format 2 years ago
.clang-format Add .editorconfig and linting 1 year ago
.editorconfig Add .editorconfig and linting 1 year ago
.gitattributes Merge cmkrlib into the cmkr target 4 years ago
.gitignore Remove a bunch of dead code 2 years ago
CMakeLists.txt Bump to 0.2.25 1 year ago
LICENSE Create LICENSE 4 years ago
README.md Initial draft of new documentation 2 years ago
cmake.toml Bump to 0.2.25 1 year ago

README.md

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