mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-10 23:44:29 +00:00
add bzlmod support (#254)
This commit is contained in:
parent
fc88b4936a
commit
48054f64ab
18 changed files with 134 additions and 63 deletions
2
test/.bazelrc
Normal file
2
test/.bazelrc
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import %workspace%/../.bazelrc
|
||||
|
||||
25
test/BUILD.bazel
Normal file
25
test/BUILD.bazel
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("@magic_enum//bazel:copts.bzl", "COPTS")
|
||||
|
||||
# bazel central registry has a catch2 module, but is newer than the one included
|
||||
# in this repository
|
||||
cc_library(
|
||||
name = "catch2",
|
||||
includes = ["3rdparty/Catch2/include"],
|
||||
hdrs = ["3rdparty/Catch2/include/catch2/catch.hpp"],
|
||||
copts = COPTS,
|
||||
)
|
||||
|
||||
_TESTS = [
|
||||
"test",
|
||||
"test_aliases",
|
||||
"test_containers",
|
||||
"test_flags",
|
||||
]
|
||||
|
||||
[cc_test(
|
||||
name = test,
|
||||
srcs = ["{}.cpp".format(test)],
|
||||
deps = ["@magic_enum", ":catch2"],
|
||||
copts = COPTS,
|
||||
) for test in _TESTS]
|
||||
7
test/MODULE.bazel
Normal file
7
test/MODULE.bazel
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
module(name = "magic_enum_tests")
|
||||
|
||||
bazel_dep(name = "magic_enum")
|
||||
bazel_dep(name = "platforms", version = "0.0.6")
|
||||
bazel_dep(name = "rules_cc", version = "0.0.6")
|
||||
|
||||
local_path_override(module_name = "magic_enum", path = "..")
|
||||
0
test/WORKSPACE.bazel
Normal file
0
test/WORKSPACE.bazel
Normal file
Loading…
Add table
Add a link
Reference in a new issue