Fixed ifdefs

This commit is contained in:
gabime 2023-09-28 22:58:50 +03:00
parent 0773e11883
commit 976d3d20b6
5 changed files with 34 additions and 32 deletions

View File

@ -6,7 +6,7 @@
// base sink templated over a mutex (either dummy or real)
// concrete implementation should override the sink_it_() and flush_() methods.
// locking is taken care of in this class - no locking needed by the
// implementers..
// implementers
//
#include "../common.h"

View File

@ -32,7 +32,6 @@ Windows Registry Editor Version 5.00
-----------------------------------------------------------------------------------------*/
#pragma once
#ifdef _WIN32
#include "../details/null_mutex.h"
#include "base_sink.h"
@ -250,5 +249,3 @@ using win_eventlog_sink_st = win_eventlog::win_eventlog_sink<details::null_mutex
} // namespace sinks
} // namespace spdlog
#endif

View File

@ -28,7 +28,6 @@ set(SPDLOG_UTESTS_SOURCES
test_file_logging.cpp
test_daily_logger.cpp
test_misc.cpp
test_eventlog.cpp
test_pattern_formatter.cpp
test_async.cpp
test_registry.cpp
@ -51,6 +50,10 @@ set(SPDLOG_UTESTS_SOURCES
test_include_sinks.cpp
)
if(WIN32)
list(APPEND SPDLOG_UTESTS_SOURCES test_eventlog.cpp)
endif()
if(NOT SPDLOG_NO_EXCEPTIONS)
list(APPEND SPDLOG_UTESTS_SOURCES test_errors.cpp)
endif()

View File

@ -1,9 +1,8 @@
#if _WIN32
#include "includes.h"
#include "test_sink.h"
#include "includes.h"
#include "test_sink.h"
#include "spdlog/sinks/win_eventlog_sink.h"
#include "spdlog/sinks/win_eventlog_sink.h"
static const LPCSTR TEST_SOURCE = "spdlog_test";
@ -72,4 +71,4 @@ TEST_CASE("eventlog", "[eventlog]") {
"my critical message", EVENTLOG_ERROR_TYPE);
}
#endif //_WIN32

View File

@ -1,22 +1,25 @@
#include <spdlog/sinks/android_sink.h>
#include <spdlog/sinks/ansicolor_sink.h>
#include <spdlog/sinks/base_sink.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/sinks/callback_sink.h>
#include <spdlog/sinks/daily_file_sink.h>
#include <spdlog/sinks/dist_sink.h>
#include <spdlog/sinks/dup_filter_sink.h>
#include <spdlog/sinks/hourly_file_sink.h>
#include <spdlog/sinks/msvc_sink.h>
#include <spdlog/sinks/null_sink.h>
#include <spdlog/sinks/ostream_sink.h>
#include <spdlog/sinks/ringbuffer_sink.h>
#include <spdlog/sinks/rotating_file_sink.h>
#include <spdlog/sinks/sink.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/sinks/stdout_sinks.h>
#include <spdlog/sinks/syslog_sink.h>
#include <spdlog/sinks/tcp_sink.h>
#include <spdlog/sinks/udp_sink.h>
#include <spdlog/sinks/wincolor_sink.h>
#include <spdlog/sinks/win_eventlog_sink.h>
#include "../include/spdlog/sinks/android_sink.h"
#include "spdlog/sinks/ansicolor_sink.h"
#include "spdlog/sinks/base_sink.h"
#include "spdlog/sinks/basic_file_sink.h"
#include "spdlog/sinks/callback_sink.h"
#include "spdlog/sinks/daily_file_sink.h"
#include "spdlog/sinks/dist_sink.h"
#include "spdlog/sinks/dup_filter_sink.h"
#include "spdlog/sinks/hourly_file_sink.h"
#include "spdlog/sinks/msvc_sink.h"
#include "spdlog/sinks/null_sink.h"
#include "spdlog/sinks/ostream_sink.h"
#include "spdlog/sinks/ringbuffer_sink.h"
#include "spdlog/sinks/rotating_file_sink.h"
#include "spdlog/sinks/sink.h"
#include "spdlog/sinks/stdout_color_sinks.h"
#include "spdlog/sinks/stdout_sinks.h"
#include "spdlog/sinks/syslog_sink.h"
#include "spdlog/sinks/tcp_sink.h"
#include "spdlog/sinks/udp_sink.h"
#ifdef _WIN32
#include "spdlog/sinks/wincolor_sink.h"
#include "spdlog/sinks/win_eventlog_sink.h"
#endif