From: Nilesh Patra Date: Sun, 14 Jun 2020 18:46:53 +0000 (+0100) Subject: Use external libfmt by default X-Git-Tag: archive/raspbian/1%1.5.0+ds-4+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c4208b9c5fb40c302c8da9adcebc5cf6704e4a4b;p=spdlog.git Use external libfmt by default Last-Changed: Sun, May, 14 2020 Gbp-Pq: Name use-external-fmt.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 508a0b6..7b9ede8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,7 +70,7 @@ option(SPDLOG_SANITIZE_ADDRESS "Enable address sanitizer in tests" OFF) # install options option(SPDLOG_INSTALL "Generate the install target" ${SPDLOG_MASTER_PROJECT}) -option(SPDLOG_FMT_EXTERNAL "Use external fmt library instead of bundled" OFF) +option(SPDLOG_FMT_EXTERNAL "Use external fmt library instead of bundled" ON) option(SPDLOG_FMT_EXTERNAL_HO "Use external fmt header-only library instead of bundled" OFF) option(SPDLOG_NO_EXCEPTIONS "Compile with -fno-exceptions. Call abort() on any spdlog exceptions" OFF) diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index de12606..655ca60 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -4,7 +4,7 @@ // #pragma once - +#include // // Support for logging binary data as hex // format flags: diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h index 289979a..f71037a 100644 --- a/include/spdlog/fmt/fmt.h +++ b/include/spdlog/fmt/fmt.h @@ -4,7 +4,7 @@ // #pragma once - +#include // // Include a bundled header-only copy of fmtlib or an external one. // By default spdlog include its own copy. @@ -24,4 +24,4 @@ #else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib #include #include -#endif \ No newline at end of file +#endif diff --git a/include/spdlog/fmt/ostr.h b/include/spdlog/fmt/ostr.h index f82eb67..81c46bf 100644 --- a/include/spdlog/fmt/ostr.h +++ b/include/spdlog/fmt/ostr.h @@ -7,7 +7,7 @@ // // include bundled or external copy of fmtlib's ostream support // - +#include #if !defined(SPDLOG_FMT_EXTERNAL) #ifdef SPDLOG_HEADER_ONLY #ifndef FMT_HEADER_ONLY diff --git a/include/spdlog/tweakme.h b/include/spdlog/tweakme.h index b67043e..f954d7b 100644 --- a/include/spdlog/tweakme.h +++ b/include/spdlog/tweakme.h @@ -70,7 +70,7 @@ // In this case spdlog will try to include so set your -I flag // accordingly. // -// #define SPDLOG_FMT_EXTERNAL +#define SPDLOG_FMT_EXTERNAL /usr/include/fmt /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// diff --git a/src/fmt.cpp b/src/fmt.cpp index 973dcad..ec33d10 100644 --- a/src/fmt.cpp +++ b/src/fmt.cpp @@ -6,6 +6,7 @@ // Copyright (c) 2012 - 2016, Victor Zverovich // All rights reserved. +#include #if !defined(SPDLOG_FMT_EXTERNAL) #include "spdlog/fmt/bundled/format-inl.h"