Skip to content

Commit ad3b78a

Browse files
committed
tests: fix macos target
1 parent 24a9ca6 commit ad3b78a

File tree

5 files changed

+69
-10
lines changed

5 files changed

+69
-10
lines changed

build.zig

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,19 @@ const boost_libs = [_][]const u8{
5454
"unordered",
5555
"static_string",
5656
"io",
57-
"json",
57+
"json", // (no header-only)
5858
"type_index",
5959
"type_erasure",
6060
"typeof",
6161
"units",
6262
"timer",
6363
"stacktrace",
6464
"sort",
65-
"filesystem",
66-
"context",
65+
"filesystem", // no header-only
66+
"context", // cpp + asm (no header-only)
6767
"signals2",
6868
"interprocess",
69-
"container",
69+
"container", // no header-only
7070
"variant",
7171
"variant2",
7272
"winapi",
@@ -81,7 +81,7 @@ const boost_libs = [_][]const u8{
8181
"function",
8282
"spirit",
8383
"function_types",
84-
"cobalt",
84+
"cobalt", // need boost.context & boost.asio (no header-only)
8585
"phoenix",
8686
"nowide",
8787
"locale",
@@ -94,9 +94,18 @@ const boost_libs = [_][]const u8{
9494
"tokenizer",
9595
"geometry",
9696
"crc",
97+
"hof",
98+
"interval",
99+
"local_function",
97100
"callable_traits",
98101
"compat",
99102
"bimap",
103+
"conversion",
104+
"charconv",
105+
"log",
106+
"heap",
107+
"msm",
108+
"coroutine2", // need boost.context (no header-only)
100109
};
101110

102111
pub fn build(b: *std.Build) !void {
@@ -169,8 +178,10 @@ pub fn boostLibraries(b: *std.Build, config: Config) *std.Build.Step.Compile {
169178
}
170179
if (lib.rootModuleTarget().abi == .msvc)
171180
lib.linkLibC()
172-
else
181+
else {
182+
lib.defineCMacro("_GNU_SOURCE", null);
173183
lib.linkLibCpp();
184+
}
174185
return lib;
175186
}
176187

build.zig.zon

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,42 @@
386386
.url = "git+https://github.com/boostorg/function_types#boost-1.86.0",
387387
.hash = "1220f599b1bb1592228351732048027d2ada614198be92c4972fc3fe811a698201ce",
388388
},
389+
.hof = .{
390+
.url = "git+https://github.com/boostorg/hof#boost-1.86.0",
391+
.hash = "122037bcf50bf4efff438cb79b5f772fab327204bd274dca073b26a61b5c2aedce64",
392+
},
393+
.interval = .{
394+
.url = "git+https://github.com/boostorg/interval#boost-1.86.0",
395+
.hash = "12209e07aff7ae68cdab4bac7c8fd385ce4f60a16e216b83f25ea2e23fda2c13cb7a",
396+
},
397+
.local_function = .{
398+
.url = "git+https://github.com/boostorg/local_function#boost-1.86.0",
399+
.hash = "1220ede64f13a619d5c1aeaf0029fd4a330563eb23c756c77b28679620b1758bb167",
400+
},
401+
.log = .{
402+
.url = "git+https://github.com/boostorg/log#boost-1.86.0",
403+
.hash = "122047b497d7a5cd30b383c17eb2d79e82256a87153b037048b4a520cc8ed23b5e4b",
404+
},
405+
.charconv = .{
406+
.url = "git+https://github.com/boostorg/charconv#boost-1.86.0",
407+
.hash = "12201ef391b90782296ba73b941038d7fb050cda2e6dd89c8547067c6c96548b967e",
408+
},
409+
.conversion = .{
410+
.url = "git+https://github.com/boostorg/conversion#boost-1.86.0",
411+
.hash = "12202fb2565a71313d2528944c2d24cd310322acdb6f37fe8a17f3dcd84d54f4e06b",
412+
},
413+
.heap = .{
414+
.url = "git+https://github.com/boostorg/heap#boost-1.86.0",
415+
.hash = "12204ae3e10fd18b59f286e7f7aebd7ef34455aea9d780d28eba28c1707bf89a246e",
416+
},
417+
.msm = .{
418+
.url = "git+https://github.com/boostorg/msm#boost-1.86.0",
419+
.hash = "1220af97e5583ec57181cf7db6d7e8b8e781c80a5befb9cd4300758007faf5b2ddd0",
420+
},
421+
.coroutine2 = .{
422+
.url = "git+https://github.com/boostorg/coroutine2#boost-1.86.0",
423+
.hash = "1220493d37eb17822028b1ec196eed9e5d92ef5549cc1a893cccc216406afdb06207",
424+
},
389425
},
390426
.paths = .{""},
391427
}

tests/build.zig

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,17 @@ fn buildTests(b: *std.Build, options: struct {
4848
exe.addCSourceFile(.{
4949
.file = b.path(file),
5050
.flags = &.{
51-
"-std=c++20", "-Wall",
52-
"-Wextra", "-Wpedantic",
51+
"-std=c++20",
52+
"-Wall",
53+
"-Wextra",
54+
"-Wpedantic",
5355
"-Wformat",
5456
},
5557
});
5658
}
5759
if (exe.rootModuleTarget().abi != .msvc) {
5860
exe.linkLibCpp();
61+
exe.defineCMacro("_GNU_SOURCE", null);
5962
} else {
6063
exe.linkLibC();
6164
}

tests/include_all.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
2+
13
#include <boost/algorithm/algorithm.hpp>
24
#include <boost/any.hpp>
35
#include <boost/array.hpp>
46
#include <boost/asio.hpp>
57
#include <boost/bind.hpp>
68
#include <boost/callable_traits.hpp>
7-
#include <boost/cobalt.hpp>
89
#include <boost/config.hpp>
910
#include <boost/crc.hpp>
1011
#include <boost/date_time.hpp>
@@ -13,7 +14,6 @@
1314
#include <boost/multi_array.hpp>
1415
#include <boost/numeric/odeint.hpp>
1516
#include <boost/pfr.hpp>
16-
#include <boost/process.hpp>
1717
#include <boost/safe_numerics/safe_integer.hpp>
1818
#include <boost/shared_ptr.hpp>
1919
#include <boost/signals2.hpp>

update_zon.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ GIT_URLS=(
100100
"git+https://github.com/boostorg/typeof#$BOOST_VERSION"
101101
"git+https://github.com/boostorg/units#$BOOST_VERSION"
102102
"git+https://github.com/boostorg/function_types#$BOOST_VERSION"
103+
"git+https://github.com/boostorg/hof#$BOOST_VERSION"
104+
"git+https://github.com/boostorg/interval#$BOOST_VERSION"
105+
"git+https://github.com/boostorg/local_function#$BOOST_VERSION"
106+
"git+https://github.com/boostorg/log#$BOOST_VERSION"
107+
"git+https://github.com/boostorg/charconv#$BOOST_VERSION"
108+
"git+https://github.com/boostorg/conversion#$BOOST_VERSION"
109+
"git+https://github.com/boostorg/heap#$BOOST_VERSION"
110+
"git+https://github.com/boostorg/msm#$BOOST_VERSION"
111+
"git+https://github.com/boostorg/coroutine2#$BOOST_VERSION"
103112

104113
## Add more URLs here
105114
)

0 commit comments

Comments
 (0)