Skip to content

Commit

Permalink
readme: more info
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Sep 5, 2024
1 parent 8e40d4b commit fa96dfe
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# boost-libraries-zig
# Boost Libraries using Zig build-system

[Boost Libraries](https://boost.io) using `build.zig`.

Replacing the [CMake](https://cmake.org/) and [B2](https://www.bfgroup.xyz/b2/) build system.


> [!IMPORTANT]
> For C++ projects, `zig c++` uses llvm-libunwind + llvm-libc++ (static-linking) by default.
> Except, for MSVC target (`-nostdlib++`).

### Requirements

- [zig](https://ziglang.org/download) v0.13.0 or master
Expand Down Expand Up @@ -38,6 +44,7 @@ Project-Specific Options:
ReleaseSafe
ReleaseFast
ReleaseSmall
-Datomic=[bool] Build boost.atomic library (default: false)
-Dcharconv=[bool] Build boost.charconv library (default: false)
-Dcobalt=[bool] Build boost.cobalt library (default: false)
-Dcontainer=[bool] Build boost.container library (default: false)
Expand All @@ -50,8 +57,12 @@ Project-Specific Options:
-Dlog=[bool] Build boost.log library (default: false)
-Dprocess=[bool] Build boost.process library (default: false)
-Drandom=[bool] Build boost.random library (default: false)
-Dregex=[bool] Build boost.regex library (default: false)
-Dserialization=[bool] Build boost.serialization library (default: false)
-Dstacktrace=[bool] Build boost.stacktrace library (default: false)
-Dsystem=[bool] Build boost.system library (default: false)
-Durl=[bool] Build boost.url library (default: false)
-Dwave=[bool] Build boost.wave library (default: false)
-Dshared=[bool] Build as shared library (default: false)
```

Expand Down Expand Up @@ -81,6 +92,8 @@ pub fn build(b: *std.Build) !void {
for(boost_artifact.root_module.include_dirs.items) |include_dir| {
try exe.root_module.include_dirs.append(b.allocator, include_dir);
}
// if not header-only, link library
exe.linkLibrary(boost_artifact);
}
```

Expand Down

0 comments on commit fa96dfe

Please sign in to comment.