Better code formatting in format.h
Comments about CYGWIN tests for building
This commit is contained in:
parent
774cab66e7
commit
5b88db0b2f
@ -57,12 +57,11 @@
|
|||||||
# define FMT_HAS_STRING_VIEW 1
|
# define FMT_HAS_STRING_VIEW 1
|
||||||
# define FMT_HAS_EXPERIMENTAL_STRING_VIEW 0
|
# define FMT_HAS_EXPERIMENTAL_STRING_VIEW 0
|
||||||
#else
|
#else
|
||||||
|
# define FMT_HAS_STRING_VIEW 0
|
||||||
# if (FMT_HAS_INCLUDE(<experimental/string_view>) && __cplusplus > 201402L)
|
# if (FMT_HAS_INCLUDE(<experimental/string_view>) && __cplusplus > 201402L)
|
||||||
# include <experimental/string_view>
|
# include <experimental/string_view>
|
||||||
# define FMT_HAS_STRING_VIEW 0
|
|
||||||
# define FMT_HAS_EXPERIMENTAL_STRING_VIEW 1
|
# define FMT_HAS_EXPERIMENTAL_STRING_VIEW 1
|
||||||
# else
|
# else
|
||||||
# define FMT_HAS_STRING_VIEW 0
|
|
||||||
# define FMT_HAS_EXPERIMENTAL_STRING_VIEW 0
|
# define FMT_HAS_EXPERIMENTAL_STRING_VIEW 0
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -11,6 +11,8 @@ target_compile_options(gmock PUBLIC ${CPP11_FLAG})
|
|||||||
target_compile_definitions(gmock PUBLIC GTEST_HAS_STD_WSTRING=1)
|
target_compile_definitions(gmock PUBLIC GTEST_HAS_STD_WSTRING=1)
|
||||||
target_include_directories(gmock PUBLIC .)
|
target_include_directories(gmock PUBLIC .)
|
||||||
|
|
||||||
|
# Workaround for Cygwin to make google-tests compile and run because the macro
|
||||||
|
# _POSIX_C_SOURCE must be defined to allow fileno(), strdup(), fdopen() calls.
|
||||||
if (CYGWIN)
|
if (CYGWIN)
|
||||||
target_compile_definitions(gmock PUBLIC _POSIX_C_SOURCE=200809)
|
target_compile_definitions(gmock PUBLIC _POSIX_C_SOURCE=200809)
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user