Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/BUILD.bazel
blob: 6dc626d806f123c31beefdb8c8d258b1c39e2248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Load the cc_library rule.
load("@rules_cc//cc:defs.bzl", "cc_library")

# Static library, without main.
cc_library(
    name = "catch2",
    hdrs = glob(["src/catch2/**/*.hpp"]),
    srcs = glob(["src/catch2/**/*.cpp"],
                exclude=[ "src/catch2/internal/catch_main.cpp"]),
    visibility = ["//visibility:public"],
    copts = ["-std=c++14"],
    linkstatic = True,
    includes = ["src/"],
)

# Static library, with main.
cc_library(
    name = "catch2_main",
    srcs = ["src/catch2/internal/catch_main.cpp"],
    deps = [":catch2"],
    visibility = ["//visibility:public"],
    linkstatic = True,
    copts = ["-std=c++14"],
    includes = ["src/"],
)