diff --git a/.bazelrc b/.bazelrc index dd6962b5..81b86336 100644 --- a/.bazelrc +++ b/.bazelrc @@ -4,7 +4,7 @@ build --incompatible_use_platforms_repo_for_constraints build --incompatible_enable_cc_toolchain_resolution build --incompatible_strict_action_env build --enable_runfiles -build --registry=https://raw.githubusercontent.com/bazelboost/registry/main -build --registry=https://bcr.bazel.build +common --registry=https://raw.githubusercontent.com/bazelboost/registry/main +common --registry=https://bcr.bazel.build try-import %workspace%/user.bazelrc diff --git a/.gitignore b/.gitignore index b0f49292..e85a74f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ - -/bazel-* -/external -/.cache -/compile_commands.json +bazel-* +external +.cache +compile_commands.json user.bazelrc diff --git a/MODULE.bazel b/MODULE.bazel index 70281553..a4ea70a7 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,6 +1,6 @@ module( name = "boost.uuid", - version = "1.83.0.bzl.1", + version = "1.83.0.bzl.2", compatibility_level = 108300, ) diff --git a/test/.bazelrc b/test/.bazelrc new file mode 100644 index 00000000..b14bcab6 --- /dev/null +++ b/test/.bazelrc @@ -0,0 +1 @@ +import %workspace%/../.bazelrc diff --git a/test/BUILD.bazel b/test/BUILD.bazel new file mode 100644 index 00000000..209c5b8e --- /dev/null +++ b/test/BUILD.bazel @@ -0,0 +1,38 @@ +load("@rules_cc//cc:defs.bzl", "cc_test") + +_TESTS = { + "test_bench_random": [ + "@boost.timer", + ], + # "test_detail_random_provider": [], + # "test_entropy_error": [], + # "test_generators": [], + # "test_hash": [], + # "test_include1": [], + # "test_include2": [], + # "test_io": [], + # "test_md5": [], + # "test_msvc_simd_bug981648_foo": [], + # "test_msvc_simd_bug981648_main": [], + # "test_name_generator": [], + # "test_nil_generator": [], + # "test_random_generator": [], + # "test_serialization": [], + # "test_sha1": [], + # "test_string_generator": [], + # "test_tagging": [], + # "test_uuid": [], + # "test_uuid_class": [], + # "test_uuid_in_map": [], + # "test_uuid_no_simd": [], + # "test_wserialization": [], +} + +[cc_test( + name = test, + srcs = ["{}.cpp".format(test)], + deps = _TESTS[test] + [ + "@boost.uuid", + "@boost.test//:test_main", + ], +) for test in _TESTS] diff --git a/test/MODULE.bazel b/test/MODULE.bazel new file mode 100644 index 00000000..34cdee39 --- /dev/null +++ b/test/MODULE.bazel @@ -0,0 +1,20 @@ +module(name = "boost.uuid.test") + +bazel_dep(name = "rules_cc", version = "0.0.8") +bazel_dep(name = "boost.array", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.assert", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.config", version = "1.83.0.bzl.6") +bazel_dep(name = "boost.container_hash", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.core", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.lexical_cast", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.move", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.numeric_conversion", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.predef", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.random", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.serialization", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.test", version = "1.83.0.bzl.4") +bazel_dep(name = "boost.timer", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.winapi", version = "1.83.0.bzl.1") + +bazel_dep(name = "boost.uuid") +local_path_override(module_name = "boost.uuid", path = "..") diff --git a/test/WORKSPACE.bazel b/test/WORKSPACE.bazel new file mode 100644 index 00000000..be0754f6 --- /dev/null +++ b/test/WORKSPACE.bazel @@ -0,0 +1 @@ +# SEE: MODULE.bazel