https://github.com/ahajha/build-system
(Name WIP) A build system focused on ease of use
https://github.com/ahajha/build-system
Last synced: about 2 months ago
JSON representation
(Name WIP) A build system focused on ease of use
- Host: GitHub
- URL: https://github.com/ahajha/build-system
- Owner: Ahajha
- License: mit
- Created: 2023-04-12T03:02:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-11T04:47:47.000Z (over 1 year ago)
- Last Synced: 2023-10-11T09:40:31.344Z (over 1 year ago)
- Language: Python
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Name Pending
Current name is "samur.py", a play on "ninja", the underlying build system.
# Goal
Would like a simple file format for building, inspired by cargo's `cargo.toml`.
We want at least the following options, with some suggesstions for defaults:
Compiler: gcc on Linux (maybe just 'c++'), MSVC on Windows, clang on MacOS
Linker: lld everywhere
Build modes:
Release: Optimization flags, NDEBUG
Debug: Default, DEBUG
Position-independent by default
Hidden visibility by defaultTargets should look something like:
```toml
[target1]
kind = "staticlib"
include_dir = "include"
sources = ["source1.cpp", "source2.cpp"]
```All paths are relative to the build file
(Using CMake terminology for a second)
Include directories are 'public', sources are 'private'. Header-only is an 'interface'.Eventually the goal is to have this hooked up to Conan directly
so that dependencies can be read in directly, and information can
be passed seamlessly between them.# Running
Currently, examples can be run like so:
```
python3 samur.py test/01/build.toml
```
This produces the executable `test/01/build/main`.# Running tests
From the top level directory:
```
python3 -m unittest test/unit_tests.py
```