Commit de746304 authored by Otto Kekäläinen's avatar Otto Kekäläinen Committed by Daniel Black

Fix riscv64 build failure by linking correctly with pthread

Link with -pthread instead of -lpthread, and do that for all architectures.

Contributors:
Aurelien Jarno <aurelien@aurel32.net>

Closes: #1717
parent f26e3259
...@@ -134,6 +134,7 @@ IF(UNIX) ...@@ -134,6 +134,7 @@ IF(UNIX)
IF(NOT LIBRT) IF(NOT LIBRT)
MY_SEARCH_LIBS(clock_gettime rt LIBRT) MY_SEARCH_LIBS(clock_gettime rt LIBRT)
ENDIF() ENDIF()
set(THREADS_PREFER_PTHREAD_FLAG ON)
FIND_PACKAGE(Threads) FIND_PACKAGE(Threads)
SET(CMAKE_REQUIRED_LIBRARIES SET(CMAKE_REQUIRED_LIBRARIES
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment