From cc3105e100e9b07ce6ab24f58efd1bb9d42570aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Sun, 20 Dec 2020 20:52:51 +0200 Subject: [PATCH] Fix riscv64 build failure by linking correctly with pthread Link with -pthread instead of -lpthread, and do that for all architectures. Contributors: Aurelien Jarno Closes: #1717 --- configure.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.cmake b/configure.cmake index ad2626e0357..1b85c31bdf4 100644 --- a/configure.cmake +++ b/configure.cmake @@ -134,6 +134,7 @@ IF(UNIX) IF(NOT LIBRT) MY_SEARCH_LIBS(clock_gettime rt LIBRT) ENDIF() + set(THREADS_PREFER_PTHREAD_FLAG ON) FIND_PACKAGE(Threads) SET(CMAKE_REQUIRED_LIBRARIES