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
|
# Google Mock. You can tweak these definitions to suit your need. A
|
||||||
# variable's value is empty before it's explicitly assigned to.
|
# variable's value is empty before it's explicitly assigned to.
|
||||||
macro(config_compiler_and_linker)
|
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.
|
# Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user