A simple to use JSON based C++ build system for Linux wihout the headaches of cmake.
Find a file
2024-12-29 01:38:25 +01:00
.gitignore added license 2024-12-29 01:04:33 +01:00
build.sh added optimizations 2024-12-28 22:35:54 +01:00
Crafter.Build-Configuration.cpp added libraries 2024-12-29 01:38:25 +01:00
Crafter.Build-Configuration.cppm added libraries 2024-12-29 01:38:25 +01:00
Crafter.Build-Project.cpp added libraries 2024-12-29 01:38:25 +01:00
Crafter.Build-Project.cppm added license 2024-12-29 01:04:33 +01:00
Crafter.Build.cppm added license 2024-12-29 01:04:33 +01:00
json.hpp initial commit 2024-12-28 21:00:12 +01:00
LICENSE Create LICENSE 2024-12-29 00:57:22 +01:00
main.cpp added libraries 2024-12-29 01:38:25 +01:00
project.json added libraries 2024-12-29 01:38:25 +01:00
README.md added libraries 2024-12-29 01:38:25 +01:00

About

This is a simple and easy to use C++ build system for Linux, it uses JSON based project files.

Install

Prerequisites:

clang 18>
git

Clone and build:

git clone https://github.com/The-Mighty-Cat/Crafter.Build.git
cd Crafter.Build
./build.sh

(optionally add to path)

How to use

Quickstart

create a project.json in an empty folder, open it in your preffered text editor. Create a basic project file, with a base configuration and debug and release configuration

{
    "name": "hello-world",
    "configurations": [
        {
            "name": "base",
            "standard": "c++26",
            "source_files": ["main"],
            "module_files": [],
            "build_dir": "./build",
            "output_dir": "./bin"
        },
        {
            "name": "debug",
            "extends": ["base"],
            "optimization_level": "0"
        }
        {
            "name": "release",
            "extends": ["base"],
            "optimization_level": "3"
        }
    ]
}

Save and close the file, create a main.cpp

#include <print>
int main() {
  std::println("Hello World!");
}

Save and close, then run crafter-build -c debug. Now you can run the hello-world executable that has appeared in the bin folder

CLI arguments

--help Displays this help message.

-c The name of the configuration to build.

-p The name of the project file.

-o Overrides the output folder.