Removed header only options

This commit is contained in:
gabime
2023-09-24 13:27:26 +03:00
parent fc81e0390b
commit 6d520df916
52 changed files with 11 additions and 225 deletions

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/async_logger.h>
#endif
#include <spdlog/async_logger.h>
#include <spdlog/sinks/sink.h>
#include <spdlog/details/thread_pool.h>

View File

@@ -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>

View File

@@ -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

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/common.h>
#endif
#include <algorithm>
#include <iterator>

View File

@@ -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

View File

@@ -3,9 +3,8 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/details/file_helper.h>
#endif
#include <spdlog/details/file_helper.h>
#include <spdlog/details/os.h>
#include <spdlog/common.h>

View File

@@ -56,7 +56,3 @@ private:
};
} // namespace details
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "file_helper-inl.h"
#endif

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/details/log_msg.h>
#endif
#include <spdlog/details/os.h>

View File

@@ -32,6 +32,3 @@ struct SPDLOG_API log_msg
} // namespace details
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "log_msg-inl.h"
#endif

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/details/log_msg_buffer.h>
#endif
namespace spdlog {
namespace details {

View File

@@ -28,6 +28,3 @@ public:
} // namespace details
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "log_msg_buffer-inl.h"
#endif

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/details/os.h>
#endif
#include <spdlog/common.h>

View File

@@ -117,6 +117,3 @@ SPDLOG_API bool fsync(FILE *fp);
} // namespace details
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "os-inl.h"
#endif

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/details/periodic_worker.h>
#endif
namespace spdlog {
namespace details {

View File

@@ -54,7 +54,3 @@ private:
};
} // namespace details
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "periodic_worker-inl.h"
#endif

View File

@@ -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>

View File

@@ -112,7 +112,3 @@ private:
} // namespace details
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "registry-inl.h"
#endif

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/details/thread_pool.h>
#endif
#include <spdlog/details/thread_pool.h>
#include <spdlog/common.h>
#include <cassert>

View File

@@ -118,7 +118,3 @@ private:
} // namespace details
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "thread_pool-inl.h"
#endif

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/logger.h>
#endif
#include <spdlog/logger.h>
#include <spdlog/sinks/sink.h>
#include <spdlog/pattern_formatter.h>

View File

@@ -363,7 +363,3 @@ protected:
};
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "logger-inl.h"
#endif

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/pattern_formatter.h>
#endif
#include <spdlog/pattern_formatter.h>
#include <spdlog/details/fmt_helper.h>
#include <spdlog/details/log_msg.h>

View File

@@ -123,6 +123,3 @@ private:
};
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "pattern_formatter-inl.h"
#endif

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -47,6 +47,3 @@ protected:
} // namespace sinks
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "base_sink-inl.h"
#endif

View File

@@ -3,9 +3,8 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/sinks/basic_file_sink.h>
#endif
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/common.h>
#include <spdlog/details/os.h>

View File

@@ -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

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/sinks/rotating_file_sink.h>
#endif
#include <spdlog/common.h>

View File

@@ -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

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/sinks/sink.h>
#endif
#include <spdlog/common.h>

View File

@@ -30,6 +30,3 @@ protected:
} // namespace sinks
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "sink-inl.h"
#endif

View File

@@ -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>

View File

@@ -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

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/sinks/stdout_sinks.h>
#endif
#include <spdlog/sinks/stdout_sinks.h>
#include <spdlog/details/console_globals.h>
#include <spdlog/pattern_formatter.h>

View File

@@ -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

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/sinks/wincolor_sink.h>
#endif
#include <spdlog/sinks/wincolor_sink.h>
#include <spdlog/details/windows_include.h>
#include <wincon.h>

View File

@@ -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

View File

@@ -3,9 +3,7 @@
#pragma once
#ifndef SPDLOG_HEADER_ONLY
# include <spdlog/spdlog.h>
#endif
#include <spdlog/common.h>
#include <spdlog/pattern_formatter.h>

View File

@@ -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