From 7c571338b5cb13c2e3f5ce9106175c49c149c4a5 Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Tue, 19 Feb 2019 06:32:11 -0600 Subject: [PATCH] Prefer -pthread to -lpthread for better compatibility when cross-compiling (#771) --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76e5fc59..a6160092 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -251,6 +251,7 @@ if (NOT BENCHMARK_ENABLE_EXCEPTIONS AND HAVE_STD_REGEX endif() cxx_feature_check(STEADY_CLOCK) # Ensure we have pthreads +set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) # Set up directories