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

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorValentin Tolmer2020-05-25 15:44:57 +0200
committerMartin Hořeňovský2020-05-26 14:49:49 +0200
commitd05a8e2e24927509bd1ac97c86e0d00398086621 (patch)
treeea91b8b1e4a6cfa08d156e8e1ed1770bf148e90e
parent1356788ea8c61341a2865d1f31281b7f006d0ce3 (diff)
downloadcatch3-d05a8e2e24927509bd1ac97c86e0d00398086621.tar.gz
Add Bazel support for the v3 branch
-rw-r--r--.gitignore1
-rw-r--r--BUILD.bazel25
-rw-r--r--WORKSPACE0
3 files changed, 26 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index f017e9e0..dd12a74b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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