Skip to content

Commit

Permalink
make 'pthread' and 'dl' public dependencies of 'tbb' (needed for gold…
Browse files Browse the repository at this point in the history
… linker on Linux)
  • Loading branch information
wjakob committed Sep 29, 2016
1 parent 848cd19 commit b3078a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ if (TBB_BUILD_SHARED)
RUNTIME DESTINATION bin)
endif()

if (UNIX AND NOT APPLE)
target_link_libraries(tbb PUBLIC pthread dl)

This comment has been minimized.

Copy link
@hjmjohnson

hjmjohnson Sep 30, 2016

Contributor

@wjakob
This is only valid syntax for cmake 2.8.12 or greater.

if( ${CMAKE_VERSION} LESS 2.8.12 )
target_link_libraries(tbb LINK_PUBLIC pthread dl)
else()
target_link_libraries(tbb PUBLIC pthread dl)
endif()

endif()

if(CMAKE_COMPILER_IS_GNUCC)
# Quench a warning on GCC
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/governor.cpp COMPILE_FLAGS "-Wno-missing-field-initializers ")
Expand Down

0 comments on commit b3078a4

Please sign in to comment.