Merge topic 'enable-pthread-with-logging-on'

6107f548b Link pthread when logging is enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1535
This commit is contained in:
Haocheng LIU 2019-01-31 16:07:21 +00:00 committed by Kitware Robot
commit 610bfc21ee

@ -200,7 +200,9 @@ if(TARGET vtkm::openmp)
list(APPEND backends vtkm::openmp)
endif()
if (VTKm_ENABLE_LOGGING)
list(APPEND DL_LIBS ${CMAKE_DL_LIBS}) # dladdr function
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
list(APPEND DL_LIBS ${CMAKE_DL_LIBS} Threads::Threads) # dladdr function
endif()
target_link_libraries(vtkm_cont PUBLIC vtkm_compiler_flags ${backends} ${DL_LIBS})
if(TARGET vtkm_diy)