From 7200f7ff4a4ecefd5ef17f5cc3fd1f122f115192 Mon Sep 17 00:00:00 2001 From: David Adam Date: Tue, 12 Feb 2019 22:30:53 +0800 Subject: [PATCH] Revert "Drop hard requirement on explicit `-lpthread` support" This reverts commit b402b635a9f7466616cef6e2b9cfd55a6e7068c5; as discussed in #5512 it is not required. --- cmake/ConfigureChecks.cmake | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index a13dbdbd5..2b8cd2a4a 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -31,12 +31,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON) IF(CMAKE_VERSION VERSION_LESS 3.4.0) ENABLE_LANGUAGE(C) ENDIF() -# Don't set pthreads to required. Either we're on a platform where explict -# linking with -lpthread is the norm (e.g. Linux) and it'll be found, or we're -# on a platform that include pthreads by default (e.g. BSD, macOS) where this -# won't find anything, or we're on a road-much-less-traveled OS where the user -# can figure out what's wrong without a hard error here. See #5512. -FIND_PACKAGE(Threads) +FIND_PACKAGE(Threads REQUIRED) # Detect WSL. Does not match against native Windows/WIN32. if (CMAKE_HOST_SYSTEM_VERSION MATCHES ".*-Microsoft")