summaryrefslogtreecommitdiffstats
path: root/googletest/cmake
diff options
context:
space:
mode:
authorBilly Donahue <BillyDonahue@users.noreply.github.com>2016-08-24 12:15:38 (GMT)
committerGitHub <noreply@github.com>2016-08-24 12:15:38 (GMT)
commited9d1e1ff92ce199de5ca2667a667cd0a368482a (patch)
tree456edae37d8b121f7a693b54665c0acadd688868 /googletest/cmake
parentec44c6c1675c25b9827aacd08c02433cccde7780 (diff)
parenta138385e48ee755ab8d124d6090c05580c8e9342 (diff)
downloadgoogletest-ed9d1e1ff92ce199de5ca2667a667cd0a368482a.zip
googletest-ed9d1e1ff92ce199de5ca2667a667cd0a368482a.tar.gz
googletest-ed9d1e1ff92ce199de5ca2667a667cd0a368482a.tar.bz2
Merge pull request #721 from ilmagico/fix-mingw-threads
Fix compilation of googletest with MinGW using Win32 threads
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 777b91e..8878dc1 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()