Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Add Bazel support for the v3 branch

Commit
d05a8e2e24927509bd1ac97c86e0d00398086621
Author
Valentin Tolmer ·
Committer
Martin Hořeňovský
Parents
1356788ea8c6

Files · Download .tar.gz

Changes

 .gitignore  |  1 +
 BUILD.bazel | 25 +++++++++++++++++++++++++
 WORKSPACE   |  0
 3 files changed, 26 insertions(+)

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