ERT: link to the threads library of the OS
this is required to make the opm-core build succeed if ERT was build
with -DBUILD_SHARED_LIBS=OFF . (without it, I get errors like
/home/and/src/ert/devel/libert_util/src/thread_pool_posix.c:328: error: undefined reference to 'pthread_create'
This commit is contained in:
@@ -182,6 +182,13 @@ if (UNIX)
|
|||||||
list (APPEND ERT_LIBRARIES ${MATH_LIBRARY})
|
list (APPEND ERT_LIBRARIES ${MATH_LIBRARY})
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
|
|
||||||
|
# if shared libraries are disabled on linux, explcitly linking to the
|
||||||
|
# pthreads library is required by ERT
|
||||||
|
find_package(Threads ${ERT_QUIET})
|
||||||
|
if (CMAKE_THREAD_LIBS_INIT)
|
||||||
|
list (APPEND ERT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
endif()
|
||||||
|
|
||||||
# Platform specific library where dlopen with friends lives
|
# Platform specific library where dlopen with friends lives
|
||||||
list (APPEND ERT_LIBRARIES ${CMAKE_DL_LIBS})
|
list (APPEND ERT_LIBRARIES ${CMAKE_DL_LIBS})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user