@@ -188,6 +188,8 @@ int main(void)
188188}
189189" HAVE___SYNC_VAL_COMPARE_AND_SWAP )
190190
191+
192+ set (CMAKE_REQUIRED_LIBRARIES Threads::Threads)
191193check_cxx_source_compiles ("
192194#define _XOPEN_SOURCE 500
193195#include <pthread.h>
@@ -199,6 +201,7 @@ int main(void)
199201 return 0;
200202}
201203" HAVE_RWLOCK )
204+ cmake_pop_check_state ()
202205
203206check_cxx_source_compiles ("
204207__declspec(selectany) int a;
@@ -830,7 +833,7 @@ if (BUILD_TESTING)
830833
831834 set_tests_properties (logging PROPERTIES TIMEOUT 30)
832835
833- # FIXME: Skip flaky test
836+ # FIXME: Skip flaky test
834837 set_tests_properties (logging PROPERTIES SKIP_REGULAR_EXPRESSION
835838 " Check failed: time_ns within LogTimes::LOG_PERIOD_TOL_NS of LogTimes::LOG_PERIOD_NS")
836839
@@ -855,6 +858,17 @@ if (BUILD_TESTING)
855858 add_test (NAME symbolize COMMAND symbolize_unittest)
856859 endif (TARGET symbolize_unittest)
857860
861+ if (HAVE_LIB_GMOCK)
862+ add_executable (mock-log_unittest
863+ src/mock-log_unittest.cc
864+ src/mock-log.h
865+ )
866+
867+ target_link_libraries (mock-log_unittest PRIVATE ${_GLOG_TEST_LIBS} )
868+
869+ add_test (NAME mock-log COMMAND mock-log_unittest)
870+ endif (HAVE_LIB_GMOCK)
871+
858872 # Generate an initial cache
859873
860874 get_cache_variables (_CACHEVARS)
0 commit comments