diff --git a/CMakeLists.txt b/CMakeLists.txt index dd9e51ae..b7ddf7b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -157,8 +157,7 @@ set(SPDLOG_HEADERS "include/spdlog/details/null_mutex.h" "include/spdlog/details/os.h" "include/spdlog/details/context.h" - "include/spdlog/fmt/bin_to_hex.h" - "include/spdlog/fmt/fmt.h" + "include/spdlog/bin_to_hex.h" "include/spdlog/sinks/android_sink.h" "include/spdlog/sinks/base_sink.h" "include/spdlog/sinks/basic_file_sink.h" diff --git a/example/example.cpp b/example/example.cpp index 4ced545c..15e62063 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -136,7 +136,7 @@ void async_example() { // {:p} - don't print the position on each line start. // {:n} - don't split the output to lines. -#include "spdlog/fmt/bin_to_hex.h" +#include "spdlog/bin_to_hex.h" void binary_example() { std::vector buf; for (int i = 0; i < 80; i++) { diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/bin_to_hex.h similarity index 99% rename from include/spdlog/fmt/bin_to_hex.h rename to include/spdlog/bin_to_hex.h index 86bfed1e..08941b9e 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/bin_to_hex.h @@ -7,7 +7,7 @@ #include -#include "../common.h" +#include "common.h" #if defined(__has_include) #if __has_include() diff --git a/include/spdlog/common.h b/include/spdlog/common.h index bb8b5663..2d69fb79 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -15,6 +15,8 @@ #include #include "./source_loc.h" +#include "fmt/base.h" +#include "fmt/xchar.h" #if defined(SPDLOG_SHARED_LIB) #if defined(_WIN32) @@ -30,8 +32,6 @@ #define SPDLOG_API #endif -#include "fmt/fmt.h" - #define SPDLOG_FMT_RUNTIME(format_string) fmt::runtime(format_string) #define SPDLOG_FMT_STRING(format_string) FMT_STRING(format_string) diff --git a/include/spdlog/details/fmt_helper.h b/include/spdlog/details/fmt_helper.h index ff10dcc3..62581891 100644 --- a/include/spdlog/details/fmt_helper.h +++ b/include/spdlog/details/fmt_helper.h @@ -7,7 +7,6 @@ #include #include "../common.h" -#include "../fmt/fmt.h" // Some fmt helpers to efficiently format and pad ints and strings namespace spdlog { diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h deleted file mode 100644 index 4db29253..00000000 --- a/include/spdlog/fmt/fmt.h +++ /dev/null @@ -1,9 +0,0 @@ -// -// Copyright(c) 2016-2018 Gabi Melman. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) -// - -#pragma once - -#include "fmt/format.h" -#include "fmt/xchar.h" diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h index 7588b3ea..15dd0f4d 100644 --- a/include/spdlog/sinks/hourly_file_sink.h +++ b/include/spdlog/sinks/hourly_file_sink.h @@ -14,7 +14,6 @@ #include "../details/file_helper.h" #include "../details/null_mutex.h" #include "../details/os.h" -#include "../fmt/fmt.h" #include "./base_sink.h" namespace spdlog { diff --git a/include/spdlog/stopwatch.h b/include/spdlog/stopwatch.h index cdd9b8b4..c08797ed 100644 --- a/include/spdlog/stopwatch.h +++ b/include/spdlog/stopwatch.h @@ -5,7 +5,7 @@ #include -#include "fmt/fmt.h" +#include "fmt/base.h" // Stopwatch support for spdlog (using std::chrono::steady_clock). // Displays elapsed seconds since construction as double. diff --git a/src/pattern_formatter.cpp b/src/pattern_formatter.cpp index 90dcb73b..d5248133 100644 --- a/src/pattern_formatter.cpp +++ b/src/pattern_formatter.cpp @@ -16,7 +16,6 @@ #include "spdlog/details/fmt_helper.h" #include "spdlog/details/log_msg.h" #include "spdlog/details/os.h" -#include "spdlog/fmt/fmt.h" #include "spdlog/formatter.h" namespace spdlog { diff --git a/src/sinks/async_sink.cpp b/src/sinks/async_sink.cpp index 4ae393c4..aa386b6e 100644 --- a/src/sinks/async_sink.cpp +++ b/src/sinks/async_sink.cpp @@ -5,7 +5,6 @@ #include #include -#include #include "spdlog/common.h" #include "spdlog/details/mpmc_blocking_q.h" diff --git a/tests/test_bin_to_hex.cpp b/tests/test_bin_to_hex.cpp index e3f7e004..5617013d 100644 --- a/tests/test_bin_to_hex.cpp +++ b/tests/test_bin_to_hex.cpp @@ -1,5 +1,6 @@ + #include "includes.h" -#include "spdlog/fmt/bin_to_hex.h" +#include "spdlog/bin_to_hex.h" #include "spdlog/sinks/ostream_sink.h" #include "test_sink.h" diff --git a/tests/test_sink.h b/tests/test_sink.h index 2818b68d..13eaada2 100644 --- a/tests/test_sink.h +++ b/tests/test_sink.h @@ -11,7 +11,6 @@ #include "spdlog/details/null_mutex.h" #include "spdlog/details/os.h" -#include "spdlog/fmt/fmt.h" #include "spdlog/sinks/base_sink.h" namespace spdlog {