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

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVertexwahn2025-04-15 21:35:04 +0200
committerChris Thrasher2025-06-01 21:36:26 -0600
commit3013cb897b5706e8532507cb2b6ac33e1fc35d93 (patch)
treed31fc08bfaba69e90f8e949cd36fb09d1174dbf6
parent74fcff6e5b190fb833a231b7f7c1829e3c3ac54d (diff)
downloadcatch3-3013cb897b5706e8532507cb2b6ac33e1fc35d93.tar.gz
Bazel support: Add license annotations
-rw-r--r--.bazelrc4
-rw-r--r--BUILD.bazel16
-rw-r--r--MODULE.bazel3
-rw-r--r--tests/BUILD.bazel3
4 files changed, 22 insertions, 4 deletions
diff --git a/.bazelrc b/.bazelrc
index 6084470e..b10a64f5 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,10 +1,8 @@
-# Enable Bzlmod for every Bazel command
-common --enable_bzlmod
-
build --enable_platform_specific_config
build:gcc9 --cxxopt=-std=c++2a
build:gcc11 --cxxopt=-std=c++2a
+build:gcc13 --cxxopt=-std=c++2a
build:clang13 --cxxopt=-std=c++17
build:vs2019 --cxxopt=/std:c++17
build:vs2022 --cxxopt=/std:c++17
diff --git a/BUILD.bazel b/BUILD.bazel
index 8dc83db6..0499beaa 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -1,4 +1,20 @@
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
+load("@rules_license//rules:license.bzl", "license")
+
+package(
+ default_applicable_licenses = [":license"],
+)
+
+exports_files([
+ "LICENSE.MIT",
+])
+
+license(
+ name = "license",
+ license_kinds = ["@rules_license//licenses/spdx:BSL-1.0"],
+ license_text = "LICENSE.MIT",
+)
expand_template(
name = "catch_user_config",
diff --git a/MODULE.bazel b/MODULE.bazel
index 628d77a0..8ee125ba 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -1,4 +1,5 @@
module(name = "catch2")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
-bazel_dep(name = "rules_cc", version = "0.0.17")
+bazel_dep(name = "rules_cc", version = "0.1.1")
+bazel_dep(name = "rules_license", version = "1.0.0")
diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel
index 5f0362fb..58c05205 100644
--- a/tests/BUILD.bazel
+++ b/tests/BUILD.bazel
@@ -21,6 +21,7 @@ cc_test(
size = "small",
srcs = [
"SelfTest/IntrospectiveTests/Algorithms.tests.cpp",
+ "SelfTest/IntrospectiveTests/AssertionHandler.tests.cpp",
"SelfTest/IntrospectiveTests/Clara.tests.cpp",
"SelfTest/IntrospectiveTests/CmdLine.tests.cpp",
"SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp",
@@ -30,6 +31,7 @@ cc_test(
"SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp",
"SelfTest/IntrospectiveTests/Integer.tests.cpp",
"SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp",
+ "SelfTest/IntrospectiveTests/Json.tests.cpp",
"SelfTest/IntrospectiveTests/Parse.tests.cpp",
"SelfTest/IntrospectiveTests/PartTracker.tests.cpp",
"SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp",
@@ -63,6 +65,7 @@ cc_test(
"SelfTest/UsageTests/MatchersRanges.tests.cpp",
"SelfTest/UsageTests/Message.tests.cpp",
"SelfTest/UsageTests/Misc.tests.cpp",
+ "SelfTest/UsageTests/Skip.tests.cpp",
"SelfTest/UsageTests/ToStringByte.tests.cpp",
"SelfTest/UsageTests/ToStringChrono.tests.cpp",
"SelfTest/UsageTests/ToStringGeneral.tests.cpp",