mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
add bzlmod support (#254)
This commit is contained in:
parent
fc88b4936a
commit
48054f64ab
18 changed files with 134 additions and 63 deletions
58
BUILD.bazel
58
BUILD.bazel
|
|
@ -1,3 +1,6 @@
|
|||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//bazel:copts.bzl", "COPTS")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
|
|
@ -6,58 +9,7 @@ package(default_visibility = ["//visibility:public"])
|
|||
|
||||
cc_library(
|
||||
name = "magic_enum",
|
||||
hdrs = ["include/magic_enum.hpp", "include/magic_enum_format.hpp", "include/magic_enum_fuse.hpp", "include/magic_enum_switch.hpp"],
|
||||
hdrs = glob(["include/*.hpp"]),
|
||||
copts = COPTS,
|
||||
includes = ["include"],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "example",
|
||||
srcs = ["example/example.cpp"],
|
||||
copts = ["-std=c++17"],
|
||||
deps = [":magic_enum"],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "enum_flag_example",
|
||||
srcs = ["example/enum_flag_example.cpp"],
|
||||
copts = ["-std=c++17"],
|
||||
deps = [":magic_enum"],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "example_custom_name",
|
||||
srcs = ["example/example_custom_name.cpp"],
|
||||
copts = ["-std=c++17"],
|
||||
deps = [":magic_enum"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "catch",
|
||||
srcs = [],
|
||||
hdrs = ["test/3rdparty/Catch2/include/catch2/catch.hpp"],
|
||||
strip_include_prefix = "test/3rdparty/Catch2/include",
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "test",
|
||||
srcs = [
|
||||
"test/test.cpp",
|
||||
],
|
||||
copts = ["-std=c++17"],
|
||||
deps = [
|
||||
":catch",
|
||||
":magic_enum",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "test_flags",
|
||||
srcs = [
|
||||
"test/test_flags.cpp",
|
||||
],
|
||||
copts = ["-std=c++17"],
|
||||
deps = [
|
||||
":catch",
|
||||
":magic_enum",
|
||||
],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue