Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions modules/spdlog/1.16.0.bcr.2/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module(
name = "spdlog",
version = "1.16.0.bcr.2",
bazel_compatibility = [">=7.2.1"],
compatibility_level = 1,
)

bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "fmt", version = "12.0.0")
bazel_dep(name = "rules_cc", version = "0.2.9")
bazel_dep(name = "rules_license", version = "1.0.0")

bazel_dep(name = "catch2", version = "3.11.0", dev_dependency = True)
133 changes: 133 additions & 0 deletions modules/spdlog/1.16.0.bcr.2/overlay/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_license//rules:license.bzl", "license")

package(
default_applicable_licenses = [":license"],
)

exports_files([
"LICENSE",
])

license(
name = "license",
license_kinds = ["@rules_license//licenses/spdx:MIT"],
license_text = "LICENSE",
)

bool_flag(
name = "header_only",
build_setting_default = True,
)

config_setting(
name = "header_only_true",
flag_values = {
":header_only": "True",
},
)

bool_flag(
name = "use_fmt",
build_setting_default = True,
)

config_setting(
name = "use_fmt_true",
flag_values = {
":use_fmt": "True",
},
)

SRCS = glob(
[
"src/*.cpp",
],
exclude = [
"src/bundled*",
],
)

HDRS = glob(
[
"include/**/*.h",
],
exclude = [
"include/**/*-inl.h",
"include/spdlog/fmt/bundled/**",
],
)

INLS = glob(
[
"include/**/*-inl.h",
],
exclude = [
"include/spdlog/fmt/bundled/**",
],
)

cc_library(
name = "spdlog",
srcs = select({
":header_only_true": [],
"//conditions:default": SRCS + INLS,
}),
hdrs = select({
":header_only_true": HDRS + INLS,
"//conditions:default": HDRS,
}),
defines = select({
":use_fmt_true": ["SPDLOG_FMT_EXTERNAL"],
"//conditions:default": ["SPDLOG_USE_STD_FORMAT"],
}) +
select({
":header_only_true": [],
"//conditions:default": ["SPDLOG_COMPILED_LIB"],
}),
includes = ["include"],
visibility = ["//visibility:public"],
deps = select({
":use_fmt_true": ["@fmt"],
"//conditions:default": [],
}),
)

cc_test(
name = "spdlog_test",
srcs = [
"tests/includes.h",
"tests/main.cpp",
"tests/test_async.cpp",
"tests/test_backtrace.cpp",
"tests/test_bin_to_hex.cpp",
"tests/test_cfg.cpp",
"tests/test_circular_q.cpp",
"tests/test_create_dir.cpp",
"tests/test_custom_callbacks.cpp",
"tests/test_daily_logger.cpp",
"tests/test_dup_filter.cpp",
"tests/test_errors.cpp",
"tests/test_eventlog.cpp",
"tests/test_file_helper.cpp",
"tests/test_file_logging.cpp",
"tests/test_fmt_helper.cpp",
"tests/test_macros.cpp",
"tests/test_misc.cpp",
"tests/test_mpmc_q.cpp",
"tests/test_pattern_formatter.cpp",
"tests/test_registry.cpp",
"tests/test_sink.h",
"tests/test_stdout_api.cpp",
"tests/test_stopwatch.cpp",
"tests/test_systemd.cpp",
"tests/test_time_point.cpp",
"tests/utils.cpp",
"tests/utils.h",
],
deps = [
":spdlog",
"@catch2//:catch2_main",
],
)
13 changes: 13 additions & 0 deletions modules/spdlog/1.16.0.bcr.2/overlay/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module(
name = "spdlog",
version = "1.16.0.bcr.2",
compatibility_level = 1,
bazel_compatibility = [">=7.2.1"],
)

bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "fmt", version = "12.0.0")
bazel_dep(name = "rules_cc", version = "0.2.9")
bazel_dep(name = "rules_license", version = "1.0.0")

bazel_dep(name = "catch2", version = "3.11.0", dev_dependency = True)
106 changes: 106 additions & 0 deletions modules/spdlog/1.16.0.bcr.2/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
matrix:
unix_platform:
- debian10
- debian11
- macos
- macos_arm64
- ubuntu2004
- ubuntu2204
- ubuntu2404
unix_platform_cpp20:
- macos
- macos_arm64
- ubuntu2404
windows_platform:
- windows
bazel: [7.x, 8.x, latest]

tasks:
unix_test_fmt_header:
name: Verify unix build targets (fmt, header-only)
platform: ${{ unix_platform }}
bazel: ${{ bazel }}
build_targets:
- "@spdlog//:spdlog"
build_flags:
- "--@spdlog//:header_only=true"
- "--@spdlog//:use_fmt=true"

unix_test_fmt_compiled:
name: Verify unix build targets (fmt, compiled)
platform: ${{ unix_platform }}
bazel: ${{ bazel }}
build_targets:
- "@spdlog//:spdlog"
build_flags:
- "--@spdlog//:header_only=false"
- "--@spdlog//:use_fmt=true"

unix_test_std_format_header:
name: Verify unix build targets (std::format, header-only)
platform: ${{ unix_platform_cpp20 }}
bazel: ${{ bazel }}
build_targets:
- "@spdlog//:spdlog"
build_flags:
- "--@spdlog//:header_only=true"
- "--@spdlog//:use_fmt=false"
- "--cxxopt=-std=c++20"

unix_test_std_format_compiled:
name: Verify unix build targets (std::format, compiled)
platform: ${{ unix_platform_cpp20 }}
bazel: ${{ bazel }}
build_targets:
- "@spdlog//:spdlog"
build_flags:
- "--@spdlog//:header_only=false"
- "--@spdlog//:use_fmt=false"
- "--cxxopt=-std=c++20"

windows_test_fmt_header:
name: Verify windows build targets (fmt, header-only)
platform: ${{ windows_platform }}
bazel: ${{ bazel }}
build_targets:
- "@spdlog//:spdlog"
build_flags:
- "--@spdlog//:header_only=true"
- "--@spdlog//:use_fmt=true"
- "--cxxopt=/utf-8"

windows_test_fmt_compiled:
name: Verify windows build targets (fmt, compiled)
platform: ${{ windows_platform }}
bazel: ${{ bazel }}
build_targets:
- "@spdlog//:spdlog"
build_flags:
- "--@spdlog//:header_only=false"
- "--@spdlog//:use_fmt=true"
- "--cxxopt=/utf-8"

windows_test_std_format_header:
name: Verify windows build targets (std::format, header-only)
platform: ${{ windows_platform }}
bazel: ${{ bazel }}
build_targets:
- "@spdlog//:spdlog"
build_flags:
- "--@spdlog//:header_only=true"
- "--@spdlog//:use_fmt=false"
- "--cxxopt=/std:c++20"
- "--cxxopt=/utf-8"

windows_test_std_format_compiled:
name: Verify windows build targets (std::format, compiled)
platform: ${{ windows_platform }}
bazel: ${{ bazel }}
build_targets:
- "@spdlog//:spdlog"
build_flags:
- "--@spdlog//:header_only=false"
- "--@spdlog//:use_fmt=false"
- "--cxxopt=/std:c++20"
- "--cxxopt=/utf-8"

10 changes: 10 additions & 0 deletions modules/spdlog/1.16.0.bcr.2/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/gabime/spdlog/archive/refs/tags/v1.16.0.tar.gz",
"integrity": "sha256-h0F1PkiKeN0NACTJgOH7W1yFiIRH4wnZy52Um9tSqj4=",
"strip_prefix": "spdlog-1.16.0",
"patch_strip": 0,
"overlay": {
"BUILD.bazel": "sha256-VTxrYKrPP/eUSAtuC6ytC2/MIoTpQEyE6wWyDKHA7Gc=",
"MODULE.bazel": "sha256-e8mmWvNuW8x9Y+PqlG5UrRg1XG/g+pwJO50xEUmPtKA="
}
}
3 changes: 2 additions & 1 deletion modules/spdlog/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"1.15.2",
"1.15.3",
"1.16.0",
"1.16.0.bcr.1"
"1.16.0.bcr.1",
"1.16.0.bcr.2"
],
"yanked_versions": {}
}
Loading