Prefer -pthread to -lpthread for better compatibility when cross-compiling (#771)

This commit is contained in:
Wes McKinney 2019-02-19 06:32:11 -06:00 committed by Dominic Hamon
parent b8ca0c4217
commit 7c571338b5

View File

@ -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