diff --git a/WORKSPACE b/WORKSPACE index c7354554..2aed5497 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -97,23 +97,13 @@ http_archive( http_archive( name = "fmt", - urls = ["https://github.com/fmtlib/fmt/releases/download/8.1.1/fmt-8.1.1.zip"], - strip_prefix="fmt-8.1.1", + urls = ["https://github.com/fmtlib/fmt/releases/download/11.0.2/fmt-11.0.2.zip"], + strip_prefix="fmt-11.0.2", patch_cmds=[ - "mv support/bazel/.bazelrc .bazelrc", - "mv support/bazel/.bazelversion .bazelversion", "mv support/bazel/BUILD.bazel BUILD.bazel", "mv support/bazel/WORKSPACE.bazel WORKSPACE.bazel", ], - sha256 = "23778bad8edba12d76e4075da06db591f3b0e3c6c04928ced4a7282ca3400e5d", -) - -http_archive( - name = "spdlog", - urls = ["https://github.com/gabime/spdlog/archive/refs/tags/v1.10.0.zip"], - strip_prefix="spdlog-1.10.0", - build_file = "@//third_party:BUILD.spdlog", - sha256 = "7be28ff05d32a8a11cfba94381e820dd2842835f7f319f843993101bcab44b66", + integrity = "sha256-QPxYvrzzjHWeEae9j9wWNQfSQj71BYu6fyYoDFucVGU=", ) http_archive( diff --git a/common/BUILD b/common/BUILD index 096ee465..559f45a8 100644 --- a/common/BUILD +++ b/common/BUILD @@ -43,7 +43,7 @@ cc_library( deps = select({ "@//toolchain:jammy_22.04": ["@drake_lib_jammy//:drake_shared_library"], "@//toolchain:noble_24.04": ["@drake_lib_noble//:drake_shared_library"], - }) + ["@spdlog"], + }), visibility = ["//visibility:public"], ) @@ -105,4 +105,4 @@ cc_test( "@bs_thread_pool", "@com_google_googletest//:gtest_main", ], -) \ No newline at end of file +) diff --git a/third_party/BUILD.spdlog b/third_party/BUILD.spdlog deleted file mode 100644 index b948f7ab..00000000 --- a/third_party/BUILD.spdlog +++ /dev/null @@ -1,129 +0,0 @@ - -HEADERS = [ - "include/spdlog/async.h", - "include/spdlog/async_logger.h", - "include/spdlog/async_logger-inl.h", - "include/spdlog/cfg/argv.h", - "include/spdlog/cfg/env.h", - "include/spdlog/cfg/helpers.h", - "include/spdlog/cfg/helpers-inl.h", - "include/spdlog/common.h", - "include/spdlog/common-inl.h", - "include/spdlog/details/backtracer.h", - "include/spdlog/details/backtracer-inl.h", - "include/spdlog/details/circular_q.h", - "include/spdlog/details/console_globals.h", - "include/spdlog/details/file_helper.h", - "include/spdlog/details/file_helper-inl.h", - "include/spdlog/details/fmt_helper.h", - "include/spdlog/details/log_msg_buffer.h", - "include/spdlog/details/log_msg_buffer-inl.h", - "include/spdlog/details/log_msg.h", - "include/spdlog/details/log_msg-inl.h", - "include/spdlog/details/mpmc_blocking_q.h", - "include/spdlog/details/null_mutex.h", - "include/spdlog/details/os.h", - "include/spdlog/details/os-inl.h", - "include/spdlog/details/periodic_worker.h", - "include/spdlog/details/periodic_worker-inl.h", - "include/spdlog/details/registry.h", - "include/spdlog/details/registry-inl.h", - "include/spdlog/details/synchronous_factory.h", - "include/spdlog/details/tcp_client.h", - "include/spdlog/details/tcp_client-windows.h", - "include/spdlog/details/thread_pool.h", - "include/spdlog/details/thread_pool-inl.h", - "include/spdlog/details/udp_client.h", - "include/spdlog/details/udp_client-windows.h", - "include/spdlog/details/windows_include.h", - "include/spdlog/fmt/bin_to_hex.h", - "include/spdlog/fmt/chrono.h", - "include/spdlog/fmt/compile.h", - "include/spdlog/fmt/fmt.h", - "include/spdlog/fmt/ostr.h", - "include/spdlog/fmt/ranges.h", - "include/spdlog/fmt/xchar.h", - "include/spdlog/formatter.h", - "include/spdlog/fwd.h", - "include/spdlog/logger.h", - "include/spdlog/logger-inl.h", - "include/spdlog/pattern_formatter.h", - "include/spdlog/pattern_formatter-inl.h", - "include/spdlog/sinks/android_sink.h", - "include/spdlog/sinks/ansicolor_sink.h", - "include/spdlog/sinks/ansicolor_sink-inl.h", - "include/spdlog/sinks/base_sink.h", - "include/spdlog/sinks/base_sink-inl.h", - "include/spdlog/sinks/basic_file_sink.h", - "include/spdlog/sinks/basic_file_sink-inl.h", - "include/spdlog/sinks/daily_file_sink.h", - "include/spdlog/sinks/dist_sink.h", - "include/spdlog/sinks/dup_filter_sink.h", - "include/spdlog/sinks/hourly_file_sink.h", - "include/spdlog/sinks/mongo_sink.h", - "include/spdlog/sinks/msvc_sink.h", - "include/spdlog/sinks/null_sink.h", - "include/spdlog/sinks/ostream_sink.h", - "include/spdlog/sinks/qt_sinks.h", - "include/spdlog/sinks/ringbuffer_sink.h", - "include/spdlog/sinks/rotating_file_sink.h", - "include/spdlog/sinks/rotating_file_sink-inl.h", - "include/spdlog/sinks/sink.h", - "include/spdlog/sinks/sink-inl.h", - "include/spdlog/sinks/stdout_color_sinks.h", - "include/spdlog/sinks/stdout_color_sinks-inl.h", - "include/spdlog/sinks/stdout_sinks.h", - "include/spdlog/sinks/stdout_sinks-inl.h", - "include/spdlog/sinks/syslog_sink.h", - "include/spdlog/sinks/systemd_sink.h", - "include/spdlog/sinks/tcp_sink.h", - "include/spdlog/sinks/udp_sink.h", - "include/spdlog/sinks/wincolor_sink.h", - "include/spdlog/sinks/wincolor_sink-inl.h", - "include/spdlog/sinks/win_eventlog_sink.h", - "include/spdlog/spdlog.h", - "include/spdlog/spdlog-inl.h", - "include/spdlog/stopwatch.h", - "include/spdlog/tweakme.h", - "include/spdlog/version.h", -] - -SRCS = [ - "src/async.cpp", - "src/cfg.cpp", - "src/color_sinks.cpp", - "src/file_sinks.cpp", - "src/fmt.cpp", - "src/spdlog.cpp", - "src/stdout_sinks.cpp", -] - -cc_library( - name = "spdlog", - hdrs = HEADERS, - srcs = SRCS, - local_defines = [ - "SPDLOG_COMPILED_LIB", - "SPDLOG_FMT_EXTERNAL", - ], - deps=["@fmt"], - strip_include_prefix="include/", - visibility=["//visibility:public"], -) - -cc_binary( - name = "libspdlog.so.1", - srcs = SRCS + HEADERS, - local_defines = [ - "SPDLOG_COMPILED_LIB", - "SPDLOG_FMT_EXTERNAL", - ], - linkopts = ["-Wl,-soname,libspdlog.so.1", "-lpthread"], - includes = ["include"], - linkshared = True, - linkstatic = True, - deps = [ - "@fmt//:fmt", - ], - visibility = ["//visibility:public"], -)