Skip to content

Commit ad28b4b

Browse files
committed
Bazel support: Add license annotations
1 parent 5b3b228 commit ad28b4b

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

.bazelrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# Enable Bzlmod for every Bazel command
2-
common --enable_bzlmod
3-
41
build --enable_platform_specific_config
52

63
build:gcc9 --cxxopt=-std=c++2a
74
build:gcc11 --cxxopt=-std=c++2a
5+
build:gcc13 --cxxopt=-std=c++2a
86
build:clang13 --cxxopt=-std=c++17
97
build:vs2019 --cxxopt=/std:c++17
108
build:vs2022 --cxxopt=/std:c++17

BUILD.bazel

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
2+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
3+
load("@rules_license//rules:license.bzl", "license")
4+
5+
package(
6+
default_applicable_licenses = [":license"],
7+
)
8+
9+
exports_files([
10+
"LICENSE.MIT",
11+
])
12+
13+
license(
14+
name = "license",
15+
license_kinds = ["@rules_license//licenses/spdx:BSL-1.0"],
16+
license_text = "LICENSE.MIT",
17+
)
218

319
expand_template(
420
name = "catch_user_config",

MODULE.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module(name = "catch2")
22

33
bazel_dep(name = "bazel_skylib", version = "1.7.1")
4-
bazel_dep(name = "rules_cc", version = "0.0.17")
4+
bazel_dep(name = "rules_cc", version = "0.1.1")
5+
bazel_dep(name = "rules_license", version = "1.0.0")

tests/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ cc_test(
2121
size = "small",
2222
srcs = [
2323
"SelfTest/IntrospectiveTests/Algorithms.tests.cpp",
24+
"SelfTest/IntrospectiveTests/AssertionHandler.tests.cpp",
2425
"SelfTest/IntrospectiveTests/Clara.tests.cpp",
2526
"SelfTest/IntrospectiveTests/CmdLine.tests.cpp",
2627
"SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp",
@@ -30,6 +31,7 @@ cc_test(
3031
"SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp",
3132
"SelfTest/IntrospectiveTests/Integer.tests.cpp",
3233
"SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp",
34+
"SelfTest/IntrospectiveTests/Json.tests.cpp",
3335
"SelfTest/IntrospectiveTests/Parse.tests.cpp",
3436
"SelfTest/IntrospectiveTests/PartTracker.tests.cpp",
3537
"SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp",
@@ -63,6 +65,7 @@ cc_test(
6365
"SelfTest/UsageTests/MatchersRanges.tests.cpp",
6466
"SelfTest/UsageTests/Message.tests.cpp",
6567
"SelfTest/UsageTests/Misc.tests.cpp",
68+
"SelfTest/UsageTests/Skip.tests.cpp",
6669
"SelfTest/UsageTests/ToStringByte.tests.cpp",
6770
"SelfTest/UsageTests/ToStringChrono.tests.cpp",
6871
"SelfTest/UsageTests/ToStringGeneral.tests.cpp",

0 commit comments

Comments
 (0)