Skip to content

Commit de74630

Browse files
ottokgrooverdan
authored andcommitted
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
1 parent f26e325 commit de74630

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

configure.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ IF(UNIX)
134134
IF(NOT LIBRT)
135135
MY_SEARCH_LIBS(clock_gettime rt LIBRT)
136136
ENDIF()
137+
set(THREADS_PREFER_PTHREAD_FLAG ON)
137138
FIND_PACKAGE(Threads)
138139

139140
SET(CMAKE_REQUIRED_LIBRARIES

0 commit comments

Comments
 (0)