mirror of
https://github.com/google/googletest.git
synced 2024-12-27 18:23:48 +08:00
Don't use pthread when on MinGW even if available
It's not supported, and native Windows threading is available for MinGW
This commit is contained in:
parent
9759dcda3c
commit
a138385e48
@ -46,7 +46,9 @@ endmacro()
|
||||
# Google Mock. You can tweak these definitions to suit your need. A
|
||||
# variable's value is empty before it's explicitly assigned to.
|
||||
macro(config_compiler_and_linker)
|
||||
if (NOT gtest_disable_pthreads)
|
||||
# Note: pthreads on MinGW is not supported, even if available
|
||||
# instead, we use windows threading primitives
|
||||
if (NOT gtest_disable_pthreads AND NOT MINGW)
|
||||
# Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
|
||||
find_package(Threads)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user