load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbcode_macros//build_defs:cpp_benchmark.bzl", "cpp_benchmark")
load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest")
load("../../defs.bzl", "folly_xplat_cxx_test")

oncall("fbcode_entropy_wardens_folly")

non_fbcode_target(
    _kind = folly_xplat_cxx_test,
    name = "hex_test",
    srcs = ["hex_test.cpp"],
    deps = [
        "fbsource//xplat/folly/portability:gmock",
        "fbsource//xplat/folly/portability:gtest",
        "//xplat/folly:likely",
        "//xplat/folly/codec:hex",
        "//xplat/folly/lang:keep",
    ],
)

non_fbcode_target(
    _kind = folly_xplat_cxx_test,
    name = "uuid_test",
    srcs = ["UuidTest.cpp"],
    deps = [
        "fbsource//xplat/folly/portability:gtest",
        "//third-party/fmt:fmt",
        "//xplat/folly:random",
        "//xplat/folly/codec:uuid",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "hex_test",
    srcs = ["hex_test.cpp"],
    deps = [
        "//folly:likely",
        "//folly/codec:hex",
        "//folly/lang:keep",
        "//folly/portability:gmock",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "uuid_test",
    srcs = ["UuidTest.cpp"],
    supports_static_listing = False,
    deps = [
        "fbsource//third-party/fmt:fmt",
        "//folly:random",
        "//folly/codec:uuid",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_benchmark,
    name = "uuid_benchmark",
    srcs = ["UuidBenchmark.cpp"],
    compiler_flags = ["-flto"],
    deps = [
        "//folly:benchmark",
        "//folly/codec:uuid",
    ],
    external_deps = [
        ("boost", None, "boost_lexical_cast"),
        ("boost", None, "boost_uuid"),
        ("util-linux", None, "uuid"),
    ],
)
