summaryrefslogtreecommitdiff
path: root/sci-libs/clblas/files/clblas-2.10-fix-pthread-linkage.patch
blob: aa99529df034c7e239364f5b6bc6f69ae43e183d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: fix missing linkage with pthread
Author: Ghislain Antony Vaillant <ghisvail@gmail.com>
Forwarded: no 
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/library/CMakeLists.txt
+++ b/src/library/CMakeLists.txt
@@ -888,6 +888,10 @@
 set_target_properties( clBLAS PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" )
 target_link_libraries(clBLAS ${OPENCL_LIBRARIES} ${MATH_LIBRARY})
 
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_package(Threads REQUIRED)
+target_link_libraries(clBLAS ${CMAKE_THREAD_LIBS_INIT})
+
 # CPack configuration; include the executable into the package
 install( TARGETS clBLAS
          EXPORT Library