2021-05-02 23:53:12 +02:00
2021-05-01 00:44:29 +02:00
2021-04-11 04:52:44 +03:00
2021-03-13 00:19:34 +01:00
2021-04-06 12:19:47 +02:00
2021-04-11 04:52:44 +03:00
2020-09-09 08:09:23 +03:00

cmkr

cmkr, pronounced "cmaker", is A CMakeLists.txt generator from TOML.

See the cmkr topic for examples. Feel free to add the cmkr topic to your projects if you used cmkr!

Building

cmkr requires a C++11 compiler, cmake >= 3.15.

git clone https://github.com/moalyousef/cmkr
cd cmkr
cmake -Bbin
cmake --build bin --parallel

Usage

cmkr parses cmake.toml files (using toml11 by Toru Niina) at the project directory. A basic hello world format with the minimum required fields:

[cmake]
minimum = "3.15"

[project]
name = "app"
version = "0.1.0"

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

NOTE: The documentation is currently a work-in-progress due to breaking changes since 0.1.4. For examples you can check the cmkr topic.

The cmkr executable can be run from the command-line:

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

The build command invokes cmake and the default build-system on your platform (unless a generator is specified), it also accepts extra cmake build arguments:

cmkr build --config Release 

Binary types

executable

Executable binary. Equivalent to add_executable(name).

library

Library, can be static or shared depending on the BUILD_SHARED_LIBS variable. Equivalent to add_library().

static

Static library/archive. Equivalent to add_library(name STATIC).

shared

Shared/dynamic library. Equivalent to add_library(name SHARED).

interface

Header-only library. Equivalent to add_library(name INTERFACE).

Roadmap

  • Support more cmake fields.
S
Description
Automated archival mirror of github.com/build-cpp/cmkr
Readme MIT 1.1 MiB
Languages
C++ 85.3%
CMake 14.4%
Objective-C 0.2%
C 0.1%