Better code formatting in format.h

Comments about CYGWIN tests for building
This commit is contained in:
Virgílio Fornazin 2017-12-11 10:16:36 -02:00
parent 774cab66e7
commit 5b88db0b2f
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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 ()