summaryrefslogtreecommitdiffstats
path: root/googletest/cmake
diff options
context:
space:
mode:
authorDaniele Tamino <daniele.tamino@gmail.com>2016-02-22 21:08:19 (GMT)
committerDaniele Tamino <daniele.tamino@gmail.com>2016-02-22 22:07:12 (GMT)
commita138385e48ee755ab8d124d6090c05580c8e9342 (patch)
tree5eebaf1e4c5e118c185b8460ebac6a46b99e2058 /googletest/cmake
parent9759dcda3c2f9c174521b9269018f79f55c29df8 (diff)
downloadgoogletest-a138385e48ee755ab8d124d6090c05580c8e9342.zip
googletest-a138385e48ee755ab8d124d6090c05580c8e9342.tar.gz
googletest-a138385e48ee755ab8d124d6090c05580c8e9342.tar.bz2
Don't use pthread when on MinGW even if availablerefs/pull/721/head
It's not supported, and native Windows threading is available for MinGW
Diffstat (limited to 'googletest/cmake')
-rw-r--r--googletest/cmake/internal_utils.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
index 93e6dbb..814fa56 100644
--- a/googletest/cmake/internal_utils.cmake
+++ b/googletest/cmake/internal_utils.cmake
@@ -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()