Skip to content

Commit 701210c

Browse files
author
lunochod
committed
fix undefined reference to symbol 'pthread_key_delete@@GLIBC_2.2.5'
1 parent 47662a6 commit 701210c

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/tests/CMakeLists.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -312,16 +312,16 @@ if( GTEST_FOUND )
312312
# gcc > 4.3.2 to support ACML.
313313
# If the runtime is being built by the project, use it, otherwise link to a runtime library specified in the install prefix
314314
if( BUILD_RUNTIME )
315-
target_link_libraries(test-correctness ${ACML_LIBRARIES} ${GTEST_LIBRARIES} clBLAS)
316-
target_link_libraries(test-medium ${ACML_LIBRARIES} ${GTEST_LIBRARIES} clBLAS)
317-
target_link_libraries(test-short ${ACML_LIBRARIES} ${GTEST_LIBRARIES} clBLAS)
315+
target_link_libraries(test-correctness ${ACML_LIBRARIES} ${GTEST_LIBRARIES} ${THREAD_LIBRARY} clBLAS)
316+
target_link_libraries(test-medium ${ACML_LIBRARIES} ${GTEST_LIBRARIES} ${THREAD_LIBRARY} clBLAS)
317+
target_link_libraries(test-short ${ACML_LIBRARIES} ${GTEST_LIBRARIES} ${THREAD_LIBRARY} clBLAS)
318318
else( )
319319
target_link_libraries(test-correctness
320-
${ACML_LIBRARIES} ${GTEST_LIBRARIES} ${OPENCL_LIBRARIES} ${runtime.library})
320+
${ACML_LIBRARIES} ${GTEST_LIBRARIES} ${OPENCL_LIBRARIES} ${THREAD_LIBRARY} ${runtime.library})
321321
target_link_libraries(test-medium
322-
${ACML_LIBRARIES} ${GTEST_LIBRARIES} ${OPENCL_LIBRARIES} ${runtime.library})
322+
${ACML_LIBRARIES} ${GTEST_LIBRARIES} ${OPENCL_LIBRARIES} ${THREAD_LIBRARY} ${runtime.library})
323323
target_link_libraries(test-short
324-
${ACML_LIBRARIES} ${GTEST_LIBRARIES} ${OPENCL_LIBRARIES} ${runtime.library})
324+
${ACML_LIBRARIES} ${GTEST_LIBRARIES} ${OPENCL_LIBRARIES} ${THREAD_LIBRARY} ${runtime.library})
325325
endif( )
326326
else( )
327327
#Link against the netlib reference library
@@ -350,13 +350,13 @@ if( GTEST_FOUND )
350350

351351
if( BUILD_RUNTIME )
352352
if( NETLIB_FOUND )
353-
target_link_libraries(test-correctness ${Netlib_LIBRARIES} ${GTEST_LIBRARIES} clBLAS)
354-
target_link_libraries(test-medium ${Netlib_LIBRARIES} ${GTEST_LIBRARIES} clBLAS)
355-
target_link_libraries(test-short ${Netlib_LIBRARIES} ${GTEST_LIBRARIES} clBLAS)
353+
target_link_libraries(test-correctness ${Netlib_LIBRARIES} ${GTEST_LIBRARIES} ${THREAD_LIBRARY} clBLAS)
354+
target_link_libraries(test-medium ${Netlib_LIBRARIES} ${GTEST_LIBRARIES} ${THREAD_LIBRARY} clBLAS)
355+
target_link_libraries(test-short ${Netlib_LIBRARIES} ${GTEST_LIBRARIES} ${THREAD_LIBRARY} clBLAS)
356356
else( )
357-
target_link_libraries(test-correctness ${BLAS_LIBRARIES} ${GTEST_LIBRARIES} clBLAS)
358-
target_link_libraries(test-medium ${BLAS_LIBRARIES} ${GTEST_LIBRARIES} clBLAS)
359-
target_link_libraries(test-short ${BLAS_LIBRARIES} ${GTEST_LIBRARIES} clBLAS)
357+
target_link_libraries(test-correctness ${BLAS_LIBRARIES} ${GTEST_LIBRARIES} ${THREAD_LIBRARY} clBLAS)
358+
target_link_libraries(test-medium ${BLAS_LIBRARIES} ${GTEST_LIBRARIES} ${THREAD_LIBRARY} clBLAS)
359+
target_link_libraries(test-short ${BLAS_LIBRARIES} ${GTEST_LIBRARIES} ${THREAD_LIBRARY} clBLAS)
360360
endif( )
361361
else( )
362362
if( NETLIB_FOUND )
@@ -402,12 +402,12 @@ if( GTEST_FOUND )
402402
add_executable(test-performance ${SRC_PERF} ${SRC_COMMON}
403403
${SRC_COMMON_TIMER} ${PERF_HEADERS} ${TESTS_HEADERS}
404404
${SRC_COMMON_REFIMPL})
405-
target_link_libraries(test-performance ${ACML_LIBRARIES})
405+
target_link_libraries(test-performance ${ACML_LIBRARIES} ${THREAD_LIBRARY})
406406
set_target_properties( test-performance PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" )
407407

408408

409409
if( BUILD_RUNTIME )
410-
target_link_libraries(test-performance ${GTEST_LIBRARIES} ${TIME_LIBRARY} clBLAS)
410+
target_link_libraries(test-performance ${GTEST_LIBRARIES} ${TIME_LIBRARY} ${THREAD_LIBRARY} clBLAS)
411411
else()
412412
target_link_libraries( test-performance ${GTEST_LIBRARIES} ${TIME_LIBRARY} ${OPENCL_LIBRARIES} ${runtime.library} )
413413
endif()

0 commit comments

Comments
 (0)