mirror of
https://github.com/gabime/spdlog.git
synced 2025-03-01 03:35:50 +08:00
Merge branch 'v2.x' of github.com:gabime/spdlog into v2.x
This commit is contained in:
commit
a8e7527d2d
@ -242,6 +242,10 @@ if (BUILD_SHARED_LIBS)
|
||||
endif ()
|
||||
add_library(spdlog SHARED ${VERSION_RC})
|
||||
target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB)
|
||||
set_target_properties(spdlog PROPERTIES
|
||||
CXX_VISIBILITY_PRESET hidden
|
||||
VISIBILITY_INLINES_HIDDEN ON)
|
||||
|
||||
if (MSVC)
|
||||
# disable dlls related warnings on msvc
|
||||
target_compile_options(spdlog PUBLIC $<$<AND:$<CXX_COMPILER_ID:MSVC>,$<NOT:$<COMPILE_LANGUAGE:CUDA>>>:/wd4251
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <utility>
|
||||
|
||||
// null, no cost dummy "mutex" and dummy "atomic" log level
|
||||
|
||||
namespace spdlog {
|
||||
namespace details {
|
||||
struct null_mutex {
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
protected:
|
||||
// sink formatter
|
||||
std::unique_ptr<spdlog::formatter> formatter_;
|
||||
Mutex mutex_;
|
||||
mutable Mutex mutex_;
|
||||
|
||||
virtual void sink_it_(const details::log_msg &msg) = 0;
|
||||
virtual void flush_() = 0;
|
||||
|
@ -117,6 +117,8 @@ ansicolor_stderr_sink<Mutex>::ansicolor_stderr_sink(color_mode mode)
|
||||
|
||||
// template instantiations
|
||||
#include "spdlog/details/null_mutex.h"
|
||||
template class SPDLOG_API spdlog::sinks::ansicolor_sink<std::mutex>;
|
||||
template class SPDLOG_API spdlog::sinks::ansicolor_sink<spdlog::details::null_mutex>;
|
||||
template class SPDLOG_API spdlog::sinks::ansicolor_stdout_sink<std::mutex>;
|
||||
template class SPDLOG_API spdlog::sinks::ansicolor_stdout_sink<spdlog::details::null_mutex>;
|
||||
template class SPDLOG_API spdlog::sinks::ansicolor_stderr_sink<std::mutex>;
|
||||
|
@ -142,4 +142,4 @@ bool rotating_file_sink<Mutex>::rename_file_(const filename_t &src_filename, con
|
||||
// template instantiations
|
||||
#include "spdlog/details/null_mutex.h"
|
||||
template class SPDLOG_API spdlog::sinks::rotating_file_sink<std::mutex>;
|
||||
template class SPDLOG_API spdlog::sinks::rotating_file_sink<spdlog::details::null_mutex>;
|
||||
template class SPDLOG_API spdlog::sinks::rotating_file_sink<spdlog::details::null_mutex>;
|
||||
|
Loading…
Reference in New Issue
Block a user