diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d9a54f4..22df0681 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,11 +49,9 @@ jobs: -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \ -DCMAKE_CXX_STANDARD=${{ matrix.config.cppstd }} \ -DSPDLOG_BUILD_EXAMPLE=${{ matrix.config.examples || 'ON' }} \ - -DSPDLOG_BUILD_EXAMPLE_HO=${{ matrix.config.examples || 'ON' }} \ -DSPDLOG_BUILD_WARNINGS=ON \ -DSPDLOG_BUILD_BENCH=OFF \ -DSPDLOG_BUILD_TESTS=ON \ - -DSPDLOG_BUILD_TESTS_HO=OFF \ -DSPDLOG_SANITIZE_ADDRESS=${{ matrix.config.asan || 'OFF' }} \ -DSPDLOG_USE_STD_FORMAT=${{ matrix.config.std_format || 'OFF' }} make -j2 @@ -72,11 +70,9 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=20 \ -DSPDLOG_BUILD_EXAMPLE=ON \ - -DSPDLOG_BUILD_EXAMPLE_HO=ON \ -DSPDLOG_BUILD_WARNINGS=ON \ -DSPDLOG_BUILD_BENCH=OFF \ -DSPDLOG_BUILD_TESTS=ON \ - -DSPDLOG_BUILD_TESTS_HO=OFF \ -DSPDLOG_SANITIZE_ADDRESS=OFF make -j ctest -j2 --output-on-failure diff --git a/CMakeLists.txt b/CMakeLists.txt index 20c0a816..c4abc317 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,11 +69,9 @@ option(SPDLOG_BUILD_PIC "Build position independent code (-fPIC)" OFF) # example options option(SPDLOG_BUILD_EXAMPLE "Build example" ${SPDLOG_MASTER_PROJECT}) -option(SPDLOG_BUILD_EXAMPLE_HO "Build header only example" OFF) # testing options option(SPDLOG_BUILD_TESTS "Build tests" OFF) -option(SPDLOG_BUILD_TESTS_HO "Build tests using the header only version" OFF) # bench options option(SPDLOG_BUILD_BENCH "Build benchmarks (Requires https://github.com/google/benchmark.git to be installed)" OFF) @@ -193,17 +191,6 @@ if(COMMAND target_precompile_headers AND SPDLOG_ENABLE_PCH) target_precompile_headers(spdlog PRIVATE ${PROJECT_BINARY_DIR}/spdlog_pch.h) endif() -# --------------------------------------------------------------------------------------- -# Header only version -# --------------------------------------------------------------------------------------- -add_library(spdlog_header_only INTERFACE) -add_library(spdlog::spdlog_header_only ALIAS spdlog_header_only) - -target_include_directories( - spdlog_header_only ${SPDLOG_INCLUDES_LEVEL} INTERFACE "$" - "$") -target_link_libraries(spdlog_header_only INTERFACE Threads::Threads) - # --------------------------------------------------------------------------------------- # Use fmt package if using external fmt # --------------------------------------------------------------------------------------- @@ -212,15 +199,12 @@ if(SPDLOG_FMT_EXTERNAL OR SPDLOG_FMT_EXTERNAL_HO) find_package(fmt CONFIG REQUIRED) endif() target_compile_definitions(spdlog PUBLIC SPDLOG_FMT_EXTERNAL) - target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_FMT_EXTERNAL) # use external fmt-header-nly if(SPDLOG_FMT_EXTERNAL_HO) target_link_libraries(spdlog PUBLIC fmt::fmt-header-only) - target_link_libraries(spdlog_header_only INTERFACE fmt::fmt-header-only) else() # use external compile fmt target_link_libraries(spdlog PUBLIC fmt::fmt) - target_link_libraries(spdlog_header_only INTERFACE fmt::fmt) endif() set(PKG_CONFIG_REQUIRES fmt) # add dependency to pkg-config @@ -231,7 +215,6 @@ endif() # --------------------------------------------------------------------------------------- if(ANDROID) target_link_libraries(spdlog PUBLIC log) - target_link_libraries(spdlog_header_only INTERFACE log) endif() # --------------------------------------------------------------------------------------- @@ -249,7 +232,6 @@ foreach( SPDLOG_USE_STD_FORMAT) if(${SPDLOG_OPTION}) target_compile_definitions(spdlog PUBLIC ${SPDLOG_OPTION}) - target_compile_definitions(spdlog_header_only INTERFACE ${SPDLOG_OPTION}) endif() endforeach() @@ -307,7 +289,7 @@ if(SPDLOG_INSTALL) # --------------------------------------------------------------------------------------- install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" PATTERN "fmt/bundled" EXCLUDE) install( - TARGETS spdlog spdlog_header_only + TARGETS spdlog EXPORT spdlog LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} @@ -340,8 +322,6 @@ if(SPDLOG_INSTALL) # --------------------------------------------------------------------------------------- # Install CMake config files # --------------------------------------------------------------------------------------- - export(TARGETS spdlog spdlog_header_only NAMESPACE spdlog:: - FILE "${CMAKE_CURRENT_BINARY_DIR}/${config_targets_file}") install(EXPORT spdlog DESTINATION ${export_dest_dir} NAMESPACE spdlog:: FILE ${config_targets_file}) include(CMakePackageConfigHelpers) diff --git a/INSTALL b/INSTALL index afe22193..5a3a9e6b 100644 --- a/INSTALL +++ b/INSTALL @@ -1,19 +1,7 @@ -Header only version: -================================================================== -Just copy the files to your build tree and use a C++11 compiler. -Or use CMake: - add_executable(example_header_only example.cpp) - target_link_libraries(example_header_only spdlog::spdlog_header_only) - - -Compiled library version: -================================================================== CMake: add_executable(example example.cpp) target_link_libraries(example spdlog::spdlog) -Or copy files src/*.cpp to your build tree and pass the -DSPDLOG_COMPILED_LIB to the compiler. - Tested on: gcc 4.8.1 and above clang 3.5 diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index da1ed4e2..8aca0a39 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -13,11 +13,3 @@ endif() # --------------------------------------------------------------------------------------- add_executable(example example.cpp) target_link_libraries(example PRIVATE spdlog::spdlog $<$:ws2_32>) - -# --------------------------------------------------------------------------------------- -# Example of using header-only library -# --------------------------------------------------------------------------------------- -if(SPDLOG_BUILD_EXAMPLE_HO) - add_executable(example_header_only example.cpp) - target_link_libraries(example_header_only PRIVATE spdlog::spdlog_header_only) -endif() diff --git a/include/spdlog/async_logger-inl.h b/include/spdlog/async_logger-inl.h index a068440d..7c606509 100644 --- a/include/spdlog/async_logger-inl.h +++ b/include/spdlog/async_logger-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY -# include -#endif +#include #include #include diff --git a/include/spdlog/cfg/helpers-inl.h b/include/spdlog/cfg/helpers-inl.h index d8117d42..a8099137 100644 --- a/include/spdlog/cfg/helpers-inl.h +++ b/include/spdlog/cfg/helpers-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif #include #include diff --git a/include/spdlog/cfg/helpers.h b/include/spdlog/cfg/helpers.h index ab7584e0..fb196f7a 100644 --- a/include/spdlog/cfg/helpers.h +++ b/include/spdlog/cfg/helpers.h @@ -23,7 +23,3 @@ SPDLOG_API void load_levels(const std::string &txt); } // namespace cfg } // namespace spdlog - -#ifdef SPDLOG_HEADER_ONLY -# include "helpers-inl.h" -#endif // SPDLOG_HEADER_ONLY diff --git a/include/spdlog/common-inl.h b/include/spdlog/common-inl.h index 482eb038..e708dfff 100644 --- a/include/spdlog/common-inl.h +++ b/include/spdlog/common-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif #include #include diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 22f4e8be..c1e06f86 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -53,30 +53,6 @@ # define SPDLOG_API #endif -// -// -//#ifdef SPDLOG_COMPILED_LIB -//# undef SPDLOG_HEADER_ONLY -//# if defined(SPDLOG_SHARED_LIB) -//# if defined(_WIN32) -//# ifdef spdlog_EXPORTS -//# define SPDLOG_API __declspec(dllexport) -//# else // !spdlog_EXPORTS -//# define SPDLOG_API __declspec(dllimport) -//# endif -//# else // !defined(_WIN32) -//# define SPDLOG_API __attribute__((visibility("default"))) -//# endif -//# else // !defined(SPDLOG_SHARED_LIB) -//# define SPDLOG_API -//# endif -//# define -//#else // !defined(SPDLOG_COMPILED_LIB) -//# define SPDLOG_API -//# define SPDLOG_HEADER_ONLY -//# define inline -//#endif // #ifdef SPDLOG_COMPILED_LIB - #include #if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION >= 80000 // backward compatibility with fmt versions older than 8 @@ -384,7 +360,3 @@ template } // namespace details } // namespace spdlog - -#ifdef SPDLOG_HEADER_ONLY -# include "common-inl.h" -#endif diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index b2fd76e5..51bc46bd 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -3,9 +3,8 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY -# include -#endif + +#include #include #include diff --git a/include/spdlog/details/file_helper.h b/include/spdlog/details/file_helper.h index f42a5eb1..fbed2fb3 100644 --- a/include/spdlog/details/file_helper.h +++ b/include/spdlog/details/file_helper.h @@ -56,7 +56,3 @@ private: }; } // namespace details } // namespace spdlog - -#ifdef SPDLOG_HEADER_ONLY -# include "file_helper-inl.h" -#endif diff --git a/include/spdlog/details/log_msg-inl.h b/include/spdlog/details/log_msg-inl.h index 7b1d0297..738c6324 100644 --- a/include/spdlog/details/log_msg-inl.h +++ b/include/spdlog/details/log_msg-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif #include diff --git a/include/spdlog/details/log_msg.h b/include/spdlog/details/log_msg.h index d9ad57fd..62deb6bc 100644 --- a/include/spdlog/details/log_msg.h +++ b/include/spdlog/details/log_msg.h @@ -32,6 +32,3 @@ struct SPDLOG_API log_msg } // namespace details } // namespace spdlog -#ifdef SPDLOG_HEADER_ONLY -# include "log_msg-inl.h" -#endif diff --git a/include/spdlog/details/log_msg_buffer-inl.h b/include/spdlog/details/log_msg_buffer-inl.h index 4a881a7c..a8b5b8ca 100644 --- a/include/spdlog/details/log_msg_buffer-inl.h +++ b/include/spdlog/details/log_msg_buffer-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif namespace spdlog { namespace details { diff --git a/include/spdlog/details/log_msg_buffer.h b/include/spdlog/details/log_msg_buffer.h index a60f7d38..6a111965 100644 --- a/include/spdlog/details/log_msg_buffer.h +++ b/include/spdlog/details/log_msg_buffer.h @@ -28,6 +28,3 @@ public: } // namespace details } // namespace spdlog -#ifdef SPDLOG_HEADER_ONLY -# include "log_msg_buffer-inl.h" -#endif diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index cd931578..e991f9cf 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif #include diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index a5478c32..13ffeb41 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -117,6 +117,3 @@ SPDLOG_API bool fsync(FILE *fp); } // namespace details } // namespace spdlog -#ifdef SPDLOG_HEADER_ONLY -# include "os-inl.h" -#endif diff --git a/include/spdlog/details/periodic_worker-inl.h b/include/spdlog/details/periodic_worker-inl.h index 9d86c8ee..82098c70 100644 --- a/include/spdlog/details/periodic_worker-inl.h +++ b/include/spdlog/details/periodic_worker-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif namespace spdlog { namespace details { diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d7d69b28..68d1d102 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -54,7 +54,3 @@ private: }; } // namespace details } // namespace spdlog - -#ifdef SPDLOG_HEADER_ONLY -# include "periodic_worker-inl.h" -#endif diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h index 51179865..babc31d7 100644 --- a/include/spdlog/details/registry-inl.h +++ b/include/spdlog/details/registry-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif #include #include diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h index 8e65f166..1046cfe3 100644 --- a/include/spdlog/details/registry.h +++ b/include/spdlog/details/registry.h @@ -112,7 +112,3 @@ private: } // namespace details } // namespace spdlog - -#ifdef SPDLOG_HEADER_ONLY -# include "registry-inl.h" -#endif diff --git a/include/spdlog/details/thread_pool-inl.h b/include/spdlog/details/thread_pool-inl.h index 9b631c9b..ac335a72 100644 --- a/include/spdlog/details/thread_pool-inl.h +++ b/include/spdlog/details/thread_pool-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY -# include -#endif +#include #include #include diff --git a/include/spdlog/details/thread_pool.h b/include/spdlog/details/thread_pool.h index 3d0b2cb3..edb9bf91 100644 --- a/include/spdlog/details/thread_pool.h +++ b/include/spdlog/details/thread_pool.h @@ -118,7 +118,3 @@ private: } // namespace details } // namespace spdlog - -#ifdef SPDLOG_HEADER_ONLY -# include "thread_pool-inl.h" -#endif diff --git a/include/spdlog/fmt/chrono.h b/include/spdlog/fmt/chrono.h index 83fad2ff..1cab3b74 100644 --- a/include/spdlog/fmt/chrono.h +++ b/include/spdlog/fmt/chrono.h @@ -10,11 +10,6 @@ #if !defined(SPDLOG_USE_STD_FORMAT) # if !defined(SPDLOG_FMT_EXTERNAL) -# ifdef SPDLOG_HEADER_ONLY -# ifndef FMT_HEADER_ONLY -# define FMT_HEADER_ONLY -# endif -# endif # include # else # include diff --git a/include/spdlog/fmt/compile.h b/include/spdlog/fmt/compile.h index 906e9f57..a82c7255 100644 --- a/include/spdlog/fmt/compile.h +++ b/include/spdlog/fmt/compile.h @@ -10,11 +10,6 @@ #if !defined(SPDLOG_USE_STD_FORMAT) # if !defined(SPDLOG_FMT_EXTERNAL) -# ifdef SPDLOG_HEADER_ONLY -# ifndef FMT_HEADER_ONLY -# define FMT_HEADER_ONLY -# endif -# endif # include # else # include diff --git a/include/spdlog/fmt/ostr.h b/include/spdlog/fmt/ostr.h index 75880341..6ca7a89a 100644 --- a/include/spdlog/fmt/ostr.h +++ b/include/spdlog/fmt/ostr.h @@ -10,11 +10,6 @@ #if !defined(SPDLOG_USE_STD_FORMAT) # if !defined(SPDLOG_FMT_EXTERNAL) -# ifdef SPDLOG_HEADER_ONLY -# ifndef FMT_HEADER_ONLY -# define FMT_HEADER_ONLY -# endif -# endif # include # else # include diff --git a/include/spdlog/fmt/ranges.h b/include/spdlog/fmt/ranges.h index 9103a5f6..a8094843 100644 --- a/include/spdlog/fmt/ranges.h +++ b/include/spdlog/fmt/ranges.h @@ -10,11 +10,6 @@ #if !defined(SPDLOG_USE_STD_FORMAT) # if !defined(SPDLOG_FMT_EXTERNAL) -# ifdef SPDLOG_HEADER_ONLY -# ifndef FMT_HEADER_ONLY -# define FMT_HEADER_ONLY -# endif -# endif # include # else # include diff --git a/include/spdlog/fmt/std.h b/include/spdlog/fmt/std.h index 0490cab0..c8edc45d 100644 --- a/include/spdlog/fmt/std.h +++ b/include/spdlog/fmt/std.h @@ -11,11 +11,6 @@ #if !defined(SPDLOG_USE_STD_FORMAT) # if !defined(SPDLOG_FMT_EXTERNAL) -# ifdef SPDLOG_HEADER_ONLY -# ifndef FMT_HEADER_ONLY -# define FMT_HEADER_ONLY -# endif -# endif # include # else # include diff --git a/include/spdlog/fmt/xchar.h b/include/spdlog/fmt/xchar.h index 9a766e5a..0a5f4d5f 100644 --- a/include/spdlog/fmt/xchar.h +++ b/include/spdlog/fmt/xchar.h @@ -10,11 +10,6 @@ #if !defined(SPDLOG_USE_STD_FORMAT) # if !defined(SPDLOG_FMT_EXTERNAL) -# ifdef SPDLOG_HEADER_ONLY -# ifndef FMT_HEADER_ONLY -# define FMT_HEADER_ONLY -# endif -# endif # include # else # include diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index e2fe48a1..42072b4f 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY -# include -#endif +#include #include #include diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index fb08113a..9ad7525c 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -363,7 +363,3 @@ protected: }; } // namespace spdlog - -#ifdef SPDLOG_HEADER_ONLY -# include "logger-inl.h" -#endif diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index f48fd855..8a99f6ee 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY -# include -#endif +#include #include #include diff --git a/include/spdlog/pattern_formatter.h b/include/spdlog/pattern_formatter.h index 8811b8f7..bf2eadeb 100644 --- a/include/spdlog/pattern_formatter.h +++ b/include/spdlog/pattern_formatter.h @@ -123,6 +123,3 @@ private: }; } // namespace spdlog -#ifdef SPDLOG_HEADER_ONLY -# include "pattern_formatter-inl.h" -#endif diff --git a/include/spdlog/sinks/ansicolor_sink-inl.h b/include/spdlog/sinks/ansicolor_sink-inl.h index e97b46af..4fc03214 100644 --- a/include/spdlog/sinks/ansicolor_sink-inl.h +++ b/include/spdlog/sinks/ansicolor_sink-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif #include #include diff --git a/include/spdlog/sinks/ansicolor_sink.h b/include/spdlog/sinks/ansicolor_sink.h index 0a5fc39f..9b500f33 100644 --- a/include/spdlog/sinks/ansicolor_sink.h +++ b/include/spdlog/sinks/ansicolor_sink.h @@ -112,7 +112,3 @@ using ansicolor_stderr_sink_st = ansicolor_stderr_sink -#endif #include #include diff --git a/include/spdlog/sinks/base_sink.h b/include/spdlog/sinks/base_sink.h index 2e795f59..12dc7610 100644 --- a/include/spdlog/sinks/base_sink.h +++ b/include/spdlog/sinks/base_sink.h @@ -47,6 +47,3 @@ protected: } // namespace sinks } // namespace spdlog -#ifdef SPDLOG_HEADER_ONLY -# include "base_sink-inl.h" -#endif diff --git a/include/spdlog/sinks/basic_file_sink-inl.h b/include/spdlog/sinks/basic_file_sink-inl.h index 7adc9e97..f933b95f 100644 --- a/include/spdlog/sinks/basic_file_sink-inl.h +++ b/include/spdlog/sinks/basic_file_sink-inl.h @@ -3,9 +3,8 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY -# include -#endif + +#include #include #include diff --git a/include/spdlog/sinks/basic_file_sink.h b/include/spdlog/sinks/basic_file_sink.h index aacc993b..c4113dee 100644 --- a/include/spdlog/sinks/basic_file_sink.h +++ b/include/spdlog/sinks/basic_file_sink.h @@ -55,6 +55,3 @@ inline std::shared_ptr basic_logger_st( } // namespace spdlog -#ifdef SPDLOG_HEADER_ONLY -# include "basic_file_sink-inl.h" -#endif diff --git a/include/spdlog/sinks/rotating_file_sink-inl.h b/include/spdlog/sinks/rotating_file_sink-inl.h index 762d70bf..581e02dd 100644 --- a/include/spdlog/sinks/rotating_file_sink-inl.h +++ b/include/spdlog/sinks/rotating_file_sink-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif #include diff --git a/include/spdlog/sinks/rotating_file_sink.h b/include/spdlog/sinks/rotating_file_sink.h index ce0d7b1e..b35041cf 100644 --- a/include/spdlog/sinks/rotating_file_sink.h +++ b/include/spdlog/sinks/rotating_file_sink.h @@ -75,7 +75,3 @@ inline std::shared_ptr rotating_logger_st(const std::string &logger_name logger_name, filename, max_file_size, max_files, rotate_on_open, event_handlers); } } // namespace spdlog - -#ifdef SPDLOG_HEADER_ONLY -# include "rotating_file_sink-inl.h" -#endif diff --git a/include/spdlog/sinks/sink-inl.h b/include/spdlog/sinks/sink-inl.h index 07260e55..37306a78 100644 --- a/include/spdlog/sinks/sink-inl.h +++ b/include/spdlog/sinks/sink-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif #include diff --git a/include/spdlog/sinks/sink.h b/include/spdlog/sinks/sink.h index d63b7a01..9fae6dee 100644 --- a/include/spdlog/sinks/sink.h +++ b/include/spdlog/sinks/sink.h @@ -30,6 +30,3 @@ protected: } // namespace sinks } // namespace spdlog -#ifdef SPDLOG_HEADER_ONLY -# include "sink-inl.h" -#endif diff --git a/include/spdlog/sinks/stdout_color_sinks-inl.h b/include/spdlog/sinks/stdout_color_sinks-inl.h index d5ff1d94..adc6e4c6 100644 --- a/include/spdlog/sinks/stdout_color_sinks-inl.h +++ b/include/spdlog/sinks/stdout_color_sinks-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif #include #include diff --git a/include/spdlog/sinks/stdout_color_sinks.h b/include/spdlog/sinks/stdout_color_sinks.h index 420b13ab..a3630727 100644 --- a/include/spdlog/sinks/stdout_color_sinks.h +++ b/include/spdlog/sinks/stdout_color_sinks.h @@ -39,7 +39,3 @@ template std::shared_ptr stderr_color_st(const std::string &logger_name, color_mode mode = color_mode::automatic); } // namespace spdlog - -#ifdef SPDLOG_HEADER_ONLY -# include "stdout_color_sinks-inl.h" -#endif diff --git a/include/spdlog/sinks/stdout_sinks-inl.h b/include/spdlog/sinks/stdout_sinks-inl.h index b9f6cea8..43fe3741 100644 --- a/include/spdlog/sinks/stdout_sinks-inl.h +++ b/include/spdlog/sinks/stdout_sinks-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY -# include -#endif +#include #include #include diff --git a/include/spdlog/sinks/stdout_sinks.h b/include/spdlog/sinks/stdout_sinks.h index 6fdc0de3..e519985f 100644 --- a/include/spdlog/sinks/stdout_sinks.h +++ b/include/spdlog/sinks/stdout_sinks.h @@ -82,6 +82,3 @@ std::shared_ptr stderr_logger_st(const std::string &logger_name); } // namespace spdlog -#ifdef SPDLOG_HEADER_ONLY -# include "stdout_sinks-inl.h" -#endif diff --git a/include/spdlog/sinks/wincolor_sink-inl.h b/include/spdlog/sinks/wincolor_sink-inl.h index 8446259e..0efcc9f5 100644 --- a/include/spdlog/sinks/wincolor_sink-inl.h +++ b/include/spdlog/sinks/wincolor_sink-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY -# include -#endif +#include #include #include diff --git a/include/spdlog/sinks/wincolor_sink.h b/include/spdlog/sinks/wincolor_sink.h index 92d95cb3..1a8a95f7 100644 --- a/include/spdlog/sinks/wincolor_sink.h +++ b/include/spdlog/sinks/wincolor_sink.h @@ -79,7 +79,3 @@ using wincolor_stderr_sink_mt = wincolor_stderr_sink; using wincolor_stderr_sink_st = wincolor_stderr_sink; } // namespace sinks } // namespace spdlog - -#ifdef SPDLOG_HEADER_ONLY -# include "wincolor_sink-inl.h" -#endif diff --git a/include/spdlog/spdlog-inl.h b/include/spdlog/spdlog-inl.h index 45185288..78ce44ef 100644 --- a/include/spdlog/spdlog-inl.h +++ b/include/spdlog/spdlog-inl.h @@ -3,9 +3,7 @@ #pragma once -#ifndef SPDLOG_HEADER_ONLY # include -#endif #include #include diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index d7d8b0cf..94bfc8a4 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -361,8 +361,4 @@ inline void critical(string_view_t msg) # define SPDLOG_CRITICAL(...) (void)0 #endif -#ifdef SPDLOG_HEADER_ONLY -# include "spdlog-inl.h" -#endif - #endif // SPDLOG_H diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index af4fe57a..f697282e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -84,7 +84,3 @@ if(SPDLOG_BUILD_TESTS OR SPDLOG_BUILD_ALL) spdlog_prepare_test(spdlog-utests spdlog::spdlog) endif() -# The header-only library version tests -if(SPDLOG_BUILD_TESTS_HO OR SPDLOG_BUILD_ALL) - spdlog_prepare_test(spdlog-utests-ho spdlog::spdlog_header_only) -endif()