mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-27 07:59:03 +08:00
Refactor exporing in common.h
This commit is contained in:
parent
ace82f7da6
commit
463e41f049
@ -18,23 +18,24 @@
|
||||
#include "fmt/base.h"
|
||||
#include "fmt/xchar.h"
|
||||
|
||||
#if defined(SPDLOG_SHARED_LIB)
|
||||
#if defined(_WIN32)
|
||||
#if defined(_WIN32)
|
||||
#ifdef SPDLOG_SHARED_LIB
|
||||
#ifdef spdlog_EXPORTS
|
||||
#define SPDLOG_API __declspec(dllexport)
|
||||
#else // !spdlog_EXPORTS
|
||||
#else
|
||||
#define SPDLOG_API __declspec(dllimport)
|
||||
#endif
|
||||
#else // !defined(_WIN32)
|
||||
#define SPDLOG_API __attribute__((visibility("default")))
|
||||
#endif
|
||||
#else // !defined(SPDLOG_SHARED_LIB)
|
||||
#if defined(_WIN32)
|
||||
#define SPDLOG_API
|
||||
#else
|
||||
#define SPDLOG_API __attribute__((visibility("default")))
|
||||
define SPDLOG_API
|
||||
#endif
|
||||
#else
|
||||
// in gcc/clang, always set visibility to "default"
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define SPDLOG_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define SPDLOG_API
|
||||
#endif
|
||||
#endif // defined(_WIN32)
|
||||
|
||||
#define SPDLOG_FMT_RUNTIME(format_string) fmt::runtime(format_string)
|
||||
#define SPDLOG_FMT_STRING(format_string) FMT_STRING(format_string)
|
||||
|
Loading…
Reference in New Issue
Block a user