Apply licenses with rules_license
This commit is contained in:
12
BUILD.bazel
12
BUILD.bazel
@ -2,11 +2,15 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
|
||||
load("@rules_license//rules:license.bzl", "license")
|
||||
|
||||
refresh_compile_commands(
|
||||
name = "refresh_clangd",
|
||||
targets = "//...",
|
||||
license(
|
||||
name = "license",
|
||||
license_kinds = [
|
||||
"@rules_license//licenses/spdx:BSD-3-Clause",
|
||||
],
|
||||
license_text = "LICENSE.txt",
|
||||
package_name = "ASL",
|
||||
)
|
||||
|
||||
platform(
|
||||
|
@ -6,6 +6,7 @@ module(name = "asl")
|
||||
|
||||
bazel_dep(name = "platforms", version = "0.0.10")
|
||||
bazel_dep(name = "rules_cc", version = "0.0.17")
|
||||
bazel_dep(name = "rules_license", version = "1.0.0")
|
||||
|
||||
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
|
||||
git_override(
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "base",
|
||||
hdrs = [
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "buffer",
|
||||
hdrs = [
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "formatting",
|
||||
hdrs = [
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "hashing",
|
||||
hdrs = [
|
||||
@ -14,6 +18,9 @@ cc_library(
|
||||
"//asl/base",
|
||||
"//asl/types:span",
|
||||
],
|
||||
applicable_licenses = [
|
||||
"//vendor/cityhash:license",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "writer",
|
||||
hdrs = [
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "logging",
|
||||
srcs = [
|
||||
|
@ -27,6 +27,6 @@ ASL_TEST(custom_writer)
|
||||
ASL_LOG_INFO("Hello");
|
||||
auto sv = string_writer.as_string_view();
|
||||
|
||||
ASL_TEST_EXPECT(sv == "[ INFO ] asl/logging/logging_tests.cpp:23: Hello\n");
|
||||
ASL_TEST_EXPECT(sv == "[ INFO ] asl/logging/logging_tests.cpp:27: Hello\n");
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "memory",
|
||||
hdrs = [
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "string_view",
|
||||
hdrs = [
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "atomic",
|
||||
hdrs = [
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "testing",
|
||||
hdrs = [
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "utils",
|
||||
hdrs = [
|
||||
|
@ -2,6 +2,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "box",
|
||||
hdrs = [
|
||||
|
@ -1 +1 @@
|
||||
bazel run //:refresh_clangd --config=windows -- --config=windows
|
||||
bazel run //tools:refresh_clangd --config=windows -- --config=windows
|
||||
|
@ -1 +1 @@
|
||||
bazel run //:refresh_clangd --config=linux -- --config=linux
|
||||
bazel run //tools:refresh_clangd --config=linux -- --config=linux
|
||||
|
@ -3,6 +3,11 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
load("@rules_python//python:py_binary.bzl", "py_binary")
|
||||
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "fix_line_endings",
|
||||
@ -11,3 +16,8 @@ py_binary(
|
||||
],
|
||||
visibility = ["//:__subpackages__"],
|
||||
)
|
||||
|
||||
refresh_compile_commands(
|
||||
name = "refresh_clangd",
|
||||
targets = "//...",
|
||||
)
|
||||
|
15
vendor/cityhash/BUILD.bazel
vendored
Normal file
15
vendor/cityhash/BUILD.bazel
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright 2025 Steven Le Rouzic
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
load("@rules_license//rules:license.bzl", "license")
|
||||
|
||||
license(
|
||||
name = "license",
|
||||
license_kinds = [
|
||||
"@rules_license//licenses/spdx:MIT",
|
||||
],
|
||||
license_text = "LICENSE.txt",
|
||||
package_name = "CityHash",
|
||||
package_url = "https://github.com/google/cityhash",
|
||||
)
|
15
vendor/dragonbox/BUILD.bazel
vendored
15
vendor/dragonbox/BUILD.bazel
vendored
@ -2,9 +2,24 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
load("@rules_license//rules:license.bzl", "license")
|
||||
|
||||
license(
|
||||
name = "license",
|
||||
license_kinds = [
|
||||
"@rules_license//licenses/spdx:Apache-2.0",
|
||||
],
|
||||
license_text = "LICENSE.txt",
|
||||
package_name = "Dragonbox",
|
||||
package_url = "https://github.com/jk-jeon/dragonbox",
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "dragonbox",
|
||||
hdrs = ["dragonbox.h"],
|
||||
includes = ["."],
|
||||
visibility = ["//:__subpackages__"],
|
||||
applicable_licenses = [
|
||||
":license",
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user