diff options
| author | Valentin Tolmer | 2020-05-25 15:44:57 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-05-26 14:49:49 +0200 |
| commit | d05a8e2e24927509bd1ac97c86e0d00398086621 (patch) | |
| tree | ea91b8b1e4a6cfa08d156e8e1ed1770bf148e90e | |
| parent | 1356788ea8c61341a2865d1f31281b7f006d0ce3 (diff) | |
| download | catch3-d05a8e2e24927509bd1ac97c86e0d00398086621.tar.gz | |
Add Bazel support for the v3 branch
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | BUILD.bazel | 25 | ||||
| -rw-r--r-- | WORKSPACE | 0 |
3 files changed, 26 insertions, 0 deletions
@@ -28,3 +28,4 @@ Build cmake-build-* benchmark-dir .conan/test_package/build +bazel-* diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 00000000..6dc626d8 --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,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/"], +) diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/WORKSPACE |