Skip to content

Commit 5a0d96a

Browse files
committed
Add Bazel support
1 parent 7b9f7bb commit 5a0d96a

File tree

6 files changed

+57
-4
lines changed

6 files changed

+57
-4
lines changed

.bazelrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
common --enable_bzlmod

.bazelversion

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6.4.0

BUILD.bazel

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
cc_library(
2+
name = "xtl",
3+
hdrs = glob(["include/**"]),
4+
strip_include_prefix = "include",
5+
visibility = ["//visibility:public"],
6+
)

MODULE.bazel

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module(
2+
name = "xtl",
3+
)
4+
5+
bazel_dep(
6+
name = "doctest",
7+
version = "2.4.11",
8+
dev_dependency = True,
9+
)

test/BUILD.bazel

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
cc_test(
2+
name = "test_xbase64",
3+
srcs = [
4+
"test_common_macros.hpp",
5+
"test_xbase64.cpp",
6+
],
7+
deps = [
8+
"//:xtl",
9+
"@doctest//doctest:main",
10+
],
11+
)
12+
13+
cc_test(
14+
name = "test_xbasic_fixed_string",
15+
srcs = [
16+
"test_common_macros.hpp",
17+
"test_xbasic_fixed_string.cpp",
18+
],
19+
deps = [
20+
"//:xtl",
21+
"@doctest//doctest:main",
22+
],
23+
)
24+
25+
cc_test(
26+
name = "test_xcomplex",
27+
srcs = [
28+
"test_common_macros.hpp",
29+
"test_xcomplex.cpp",
30+
],
31+
deps = [
32+
"//:xtl",
33+
"@doctest//doctest:main",
34+
],
35+
)
36+

test/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ find_package(Threads)
8585
set(XTL_TESTS
8686
test_xbase64.cpp
8787
test_xbasic_fixed_string.cpp
88-
test_xcomplex.cpp
88+
test_xclosure.cpp
8989
test_xcompare.cpp
9090
test_xcomplex_sequence.cpp
91-
test_xclosure.cpp
91+
test_xcomplex.cpp
9292
test_xdynamic_bitset.cpp
9393
test_xfunctional.cpp
9494
test_xhalf_float.cpp
@@ -99,11 +99,11 @@ set(XTL_TESTS
9999
test_xmeta_utils.cpp
100100
test_xmultimethods.cpp
101101
test_xoptional.cpp
102-
test_xsequence.cpp
103-
test_xtype_traits.cpp
104102
test_xplatform.cpp
105103
test_xproxy_wrapper.cpp
104+
test_xsequence.cpp
106105
test_xsystem.cpp
106+
test_xtype_traits.cpp
107107
test_xvariant.cpp
108108
test_xvisitor.cpp
109109
)

0 commit comments

Comments
 (0)