diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 0000000..3ce91d2 --- /dev/null +++ b/.bazelrc @@ -0,0 +1 @@ +common --enable_bzlmod diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 0000000..19b860c --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +6.4.0 diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 0000000..02d333f --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,6 @@ +cc_library( + name = "xtl", + hdrs = glob(["include/**"]), + strip_include_prefix = "include", + visibility = ["//visibility:public"], +) diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 0000000..e2ebc93 --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,9 @@ +module( + name = "xtl", +) + +bazel_dep( + name = "doctest", + version = "2.4.11", + dev_dependency = True, +) diff --git a/test/BUILD.bazel b/test/BUILD.bazel new file mode 100644 index 0000000..8f56ac0 --- /dev/null +++ b/test/BUILD.bazel @@ -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", + ], +) + diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 955ff22..1f11281 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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 @@ -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 )