From 5197a4e5618292ea812f10d7cbd22a4ef75b36a0 Mon Sep 17 00:00:00 2001 From: Tom Lin Date: Wed, 27 Jul 2022 00:16:29 +0100 Subject: [PATCH] Find TBB if USE_TBB is not set --- src/tbb/model.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tbb/model.cmake b/src/tbb/model.cmake index eeb1637..1cbd7fb 100644 --- a/src/tbb/model.cmake +++ b/src/tbb/model.cmake @@ -27,11 +27,12 @@ macro(setup) if(ONE_TBB_DIR) set(TBB_ROOT "${ONE_TBB_DIR}") # see https://github.com/Kitware/VTK/blob/0a31a9a3c1531ae238ac96a372fec4be42282863/CMake/FindTBB.cmake#L34 # docs on Intel's website refers to TBB_DIR which is not correct + endif() + if (NOT USE_TBB) + # Only find TBB when we're not building in-tree find_package(TBB REQUIRED) endif() - # No need to handle USE_TBB as both ONE_TBB_DIR and USE_TBB will create the TBB::tbb target - # see https://github.com/oneapi-src/oneTBB/blob/master/cmake/README.md#tbbconfig---integration-of-binary-packages register_link_library(TBB::tbb) register_definitions(PARTITIONER_${PARTITIONER})