Skip to content

Commit

Permalink
remove SeQuant's FindTBB (very very legacy at this point) and adapt u…
Browse files Browse the repository at this point in the history
…ses to the most recent FindTBB in VG cmake kit
  • Loading branch information
evaleev committed Apr 26, 2022
1 parent 34000da commit b10867c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 147 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,13 @@ find_package(Threads REQUIRED)
# PSTL (used by g++-9 and clang++-8 in c++17 mode) needs TBB
if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" AND
${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 9) OR
(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND
(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND
${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 8))
if (ENABLE_TBB) # but user must enable the search for TBB since this is an additional source of build entropy
find_package(TBB REQUIRED)
# TBB::tbb by default is not GLOBAL, so to allow users of LINALG_LIBRARIES to safely use it we need to make it global
# more discussion here: https://gitlab.kitware.com/cmake/cmake/-/issues/17256
set_target_properties(TBB::tbb PROPERTIES IMPORTED_GLOBAL TRUE)
endif (ENABLE_TBB)
endif ()
# check of <execution> header is usable
Expand Down
7 changes: 3 additions & 4 deletions cmake/modules/CheckCXXFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ macro(check_cxx_execution_header _prefix)
# compilation checks
##############################################
set(_prereq_list "_STANDALONE")
if (TBB_FOUND)
if (TARGET TBB::tbb)
list(APPEND _prereq_list _WITH_TBB)
endif (TBB_FOUND)
endif ()

foreach (_prereq ${_prereq_list})
cmake_push_check_state()

if (_prereq STREQUAL _WITH_TBB)
list(APPEND CMAKE_REQUIRED_LIBRARIES ${TBB_LIBRARIES})
list(APPEND CMAKE_REQUIRED_INCLUDES ${TBB_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_LIBRARIES TBB::tbb)
endif ()

CHECK_CXX_SOURCE_COMPILES(
Expand Down
142 changes: 0 additions & 142 deletions cmake/modules/FindTBB.cmake

This file was deleted.

0 comments on commit b10867c

Please sign in to comment.