Skip to content

Commit e2d339c

Browse files
author
Joan Massich
committed
[fix] add dynamic thread libraries to the target
1 parent 581cb0d commit e2d339c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ include_directories(Hello)
3232
# indicate the entry point for the executable
3333
add_executable(CMakeHelloWorld Hello HelloWorld.cpp)
3434

35+
# BLAS libraries compile dynamically against threads
36+
LIST(APPEND CMAKE_THREAD_LIBS_INIT ${LM})
37+
3538
# Indicate which libraries to include during the link process.
36-
target_link_libraries(CMakeHelloWorld Hello ${BLAS_LIBRARIES})
39+
target_link_libraries(CMakeHelloWorld Hello ${BLAS_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
3740

3841
# install (TARGETS CMakeHelloWorld DESTINATION bin)

0 commit comments

Comments
 (0)