Added support for pre-c++17 experimental string_view (#607)

Added support for pre-c++17 experimental string_view
This commit is contained in:
Virgilio Alexandre Fornazin
2017-12-16 09:03:11 -08:00
committed by Victor Zverovich
parent cabce31f45
commit 5705bf1c71
3 changed files with 63 additions and 0 deletions
+6
View File
@@ -11,6 +11,12 @@ target_compile_options(gmock PUBLIC ${CPP11_FLAG})
target_compile_definitions(gmock PUBLIC GTEST_HAS_STD_WSTRING=1)
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)
target_compile_definitions(gmock PUBLIC _POSIX_C_SOURCE=200809)
endif ()
find_package(Threads)
if (Threads_FOUND)
target_link_libraries(gmock ${CMAKE_THREAD_LIBS_INIT})