mirror of
https://github.com/fmtlib/fmt.git
synced 2026-07-30 16:26:27 +08:00
Minor cleanup
This commit is contained in:
parent
a2206152d5
commit
d24fef27d1
@ -12,12 +12,6 @@
|
|||||||
#include <stddef.h> // size_t
|
#include <stddef.h> // size_t
|
||||||
#include <stdio.h> // FILE
|
#include <stdio.h> // FILE
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
# define FMT_CVISIBILITY(value) __attribute__((visibility(value)))
|
|
||||||
#else
|
|
||||||
# define FMT_CVISIBILITY(value)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
|
#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
|
||||||
# if defined(FMT_LIB_EXPORT)
|
# if defined(FMT_LIB_EXPORT)
|
||||||
# define FMT_CAPI __declspec(dllexport)
|
# define FMT_CAPI __declspec(dllexport)
|
||||||
@ -25,7 +19,11 @@
|
|||||||
# define FMT_CAPI __declspec(dllimport)
|
# define FMT_CAPI __declspec(dllimport)
|
||||||
# endif
|
# endif
|
||||||
#elif defined(FMT_LIB_EXPORT) || defined(FMT_SHARED)
|
#elif defined(FMT_LIB_EXPORT) || defined(FMT_SHARED)
|
||||||
# define FMT_CAPI FMT_CVISIBILITY("default")
|
# ifdef __GNUC__
|
||||||
|
# define FMT_CAPI __attribute__((visibility("default")))
|
||||||
|
# else
|
||||||
|
# define FMT_CAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef FMT_CAPI
|
#ifndef FMT_CAPI
|
||||||
# define FMT_CAPI
|
# define FMT_CAPI
|
||||||
|
|||||||
@ -243,5 +243,5 @@ endif ()
|
|||||||
|
|
||||||
enable_language(C)
|
enable_language(C)
|
||||||
add_executable(c-test c-test.c)
|
add_executable(c-test c-test.c)
|
||||||
target_link_libraries(c-test PUBLIC fmt::fmt-c)
|
target_link_libraries(c-test PRIVATE fmt::fmt-c)
|
||||||
add_test(NAME c-test COMMAND c-test)
|
add_test(NAME c-test COMMAND c-test)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user