Commit a138385e authored by Daniele Tamino's avatar Daniele Tamino
Browse files

Don't use pthread when on MinGW even if available

It's not supported, and native Windows threading is available for MinGW
parent 9759dcda
...@@ -46,7 +46,9 @@ endmacro() ...@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment