Skip to content

Commit

Permalink
Add Bazel support
Browse files Browse the repository at this point in the history
  • Loading branch information
Vertexwahn committed Dec 9, 2023
1 parent 7b9f7bb commit 5a0d96a
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 4 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
common --enable_bzlmod
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.4.0
6 changes: 6 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cc_library(
name = "xtl",
hdrs = glob(["include/**"]),
strip_include_prefix = "include",
visibility = ["//visibility:public"],
)
9 changes: 9 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module(
name = "xtl",
)

bazel_dep(
name = "doctest",
version = "2.4.11",
dev_dependency = True,
)
36 changes: 36 additions & 0 deletions test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cc_test(
name = "test_xbase64",
srcs = [
"test_common_macros.hpp",
"test_xbase64.cpp",
],
deps = [
"//:xtl",
"@doctest//doctest:main",
],
)

cc_test(
name = "test_xbasic_fixed_string",
srcs = [
"test_common_macros.hpp",
"test_xbasic_fixed_string.cpp",
],
deps = [
"//:xtl",
"@doctest//doctest:main",
],
)

cc_test(
name = "test_xcomplex",
srcs = [
"test_common_macros.hpp",
"test_xcomplex.cpp",
],
deps = [
"//:xtl",
"@doctest//doctest:main",
],
)

8 changes: 4 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ find_package(Threads)
set(XTL_TESTS
test_xbase64.cpp
test_xbasic_fixed_string.cpp
test_xcomplex.cpp
test_xclosure.cpp
test_xcompare.cpp
test_xcomplex_sequence.cpp
test_xclosure.cpp
test_xcomplex.cpp
test_xdynamic_bitset.cpp
test_xfunctional.cpp
test_xhalf_float.cpp
Expand All @@ -99,11 +99,11 @@ set(XTL_TESTS
test_xmeta_utils.cpp
test_xmultimethods.cpp
test_xoptional.cpp
test_xsequence.cpp
test_xtype_traits.cpp
test_xplatform.cpp
test_xproxy_wrapper.cpp
test_xsequence.cpp
test_xsystem.cpp
test_xtype_traits.cpp
test_xvariant.cpp
test_xvisitor.cpp
)
Expand Down

0 comments on commit 5a0d96a

Please sign in to comment.