Merge pull request #5036 from Tachi107:cmake-pthread-flag
PiperOrigin-RevId: 952246866 Change-Id: Idccc63f83a51d6c143966d45fa197677ea58ca16
This commit is contained in:
@@ -63,6 +63,7 @@ macro(config_compiler_and_linker)
|
||||
unset(GTEST_HAS_PTHREAD)
|
||||
if (NOT gtest_disable_pthreads AND NOT MINGW)
|
||||
# Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package(Threads)
|
||||
if (CMAKE_USE_PTHREADS_INIT)
|
||||
set(GTEST_HAS_PTHREAD ON)
|
||||
|
||||
Reference in New Issue
Block a user