mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 08:25:43 +08:00
Removed header only options
This commit is contained in:
parent
fc81e0390b
commit
6d520df916
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
@ -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 "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
|
||||
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)
|
||||
|
12
INSTALL
12
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
|
||||
|
@ -13,11 +13,3 @@ endif()
|
||||
# ---------------------------------------------------------------------------------------
|
||||
add_executable(example example.cpp)
|
||||
target_link_libraries(example PRIVATE spdlog::spdlog $<$<BOOL:${MINGW}>: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()
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
#include <spdlog/async_logger.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/sinks/sink.h>
|
||||
#include <spdlog/details/thread_pool.h>
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/cfg/helpers.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <spdlog/details/os.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
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/common.h>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
@ -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 <spdlog/fmt/fmt.h>
|
||||
|
||||
#if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION >= 80000 // backward compatibility with fmt versions older than 8
|
||||
@ -384,7 +360,3 @@ template<typename T, typename... Args>
|
||||
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "common-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
|
||||
#include <spdlog/details/file_helper.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/details/os.h>
|
||||
#include <spdlog/common.h>
|
||||
|
@ -56,7 +56,3 @@ private:
|
||||
};
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "file_helper-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/log_msg.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/details/os.h>
|
||||
|
||||
|
@ -32,6 +32,3 @@ struct SPDLOG_API log_msg
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "log_msg-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/log_msg_buffer.h>
|
||||
#endif
|
||||
|
||||
namespace spdlog {
|
||||
namespace details {
|
||||
|
@ -28,6 +28,3 @@ public:
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "log_msg_buffer-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/os.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
|
||||
|
@ -117,6 +117,3 @@ SPDLOG_API bool fsync(FILE *fp);
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "os-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/periodic_worker.h>
|
||||
#endif
|
||||
|
||||
namespace spdlog {
|
||||
namespace details {
|
||||
|
@ -54,7 +54,3 @@ private:
|
||||
};
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "periodic_worker-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/details/registry.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
#include <spdlog/details/periodic_worker.h>
|
||||
|
@ -112,7 +112,3 @@ private:
|
||||
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "registry-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
#include <spdlog/details/thread_pool.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
#include <cassert>
|
||||
|
@ -118,7 +118,3 @@ private:
|
||||
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "thread_pool-inl.h"
|
||||
#endif
|
||||
|
@ -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 <spdlog/fmt/bundled/chrono.h>
|
||||
# else
|
||||
# include <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 <spdlog/fmt/bundled/compile.h>
|
||||
# else
|
||||
# include <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 <spdlog/fmt/bundled/ostream.h>
|
||||
# else
|
||||
# include <fmt/ostream.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 <spdlog/fmt/bundled/ranges.h>
|
||||
# else
|
||||
# include <fmt/ranges.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 <spdlog/fmt/bundled/std.h>
|
||||
# else
|
||||
# include <fmt/std.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 <spdlog/fmt/bundled/xchar.h>
|
||||
# else
|
||||
# include <fmt/xchar.h>
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
#include <spdlog/logger.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/sinks/sink.h>
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
|
@ -363,7 +363,3 @@ protected:
|
||||
};
|
||||
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "logger-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/details/fmt_helper.h>
|
||||
#include <spdlog/details/log_msg.h>
|
||||
|
@ -123,6 +123,3 @@ private:
|
||||
};
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "pattern_formatter-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/ansicolor_sink.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
#include <spdlog/details/os.h>
|
||||
|
@ -112,7 +112,3 @@ using ansicolor_stderr_sink_st = ansicolor_stderr_sink<details::console_nullmute
|
||||
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "ansicolor_sink-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/base_sink.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
|
@ -47,6 +47,3 @@ protected:
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "base_sink-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
|
||||
#include <spdlog/sinks/basic_file_sink.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
#include <spdlog/details/os.h>
|
||||
|
@ -55,6 +55,3 @@ inline std::shared_ptr<logger> basic_logger_st(
|
||||
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "basic_file_sink-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/rotating_file_sink.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
|
||||
|
@ -75,7 +75,3 @@ inline std::shared_ptr<logger> 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
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/sink.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
|
||||
|
@ -30,6 +30,3 @@ protected:
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "sink-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/logger.h>
|
||||
#include <spdlog/common.h>
|
||||
|
@ -39,7 +39,3 @@ template<typename Factory = spdlog::synchronous_factory>
|
||||
std::shared_ptr<logger> 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
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
#include <spdlog/sinks/stdout_sinks.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/details/console_globals.h>
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
|
@ -82,6 +82,3 @@ std::shared_ptr<logger> stderr_logger_st(const std::string &logger_name);
|
||||
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "stdout_sinks-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
#include <spdlog/sinks/wincolor_sink.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/details/windows_include.h>
|
||||
#include <wincon.h>
|
||||
|
@ -79,7 +79,3 @@ using wincolor_stderr_sink_mt = wincolor_stderr_sink<details::console_mutex>;
|
||||
using wincolor_stderr_sink_st = wincolor_stderr_sink<details::console_nullmutex>;
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
# include "wincolor_sink-inl.h"
|
||||
#endif
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef SPDLOG_HEADER_ONLY
|
||||
# include <spdlog/spdlog.h>
|
||||
#endif
|
||||
|
||||
#include <spdlog/common.h>
|
||||
#include <spdlog/pattern_formatter.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
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user