From ab7a660c8d7737680315d744a3a9c711bcc67bdf Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Tue, 7 Feb 2023 12:25:18 -0700 Subject: [PATCH 1/2] fix: Ensure TBB is optional using OPTIONAL_COMPONENTS --- cpp/cmake/threading.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/cmake/threading.cmake b/cpp/cmake/threading.cmake index f91b86b385..d1b9327a6a 100644 --- a/cpp/cmake/threading.cmake +++ b/cpp/cmake/threading.cmake @@ -28,7 +28,7 @@ if(DISABLE_TBB) message(STATUS "Intel Thread Building Blocks is disabled.") add_definitions(-DNO_TBB) else() - find_package(TBB REQUIRED tbb) + find_package(TBB OPTIONAL_COMPONENTS tbb) if(${TBB_FOUND}) message(STATUS "Intel Thread Building Blocks is enabled.") else() From 56d616398d2f30ce24189e326dc1e968be2d5230 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Tue, 7 Feb 2023 16:37:40 -0700 Subject: [PATCH 2/2] chore: Avoid noisy message when tbb not found --- cpp/cmake/threading.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/cmake/threading.cmake b/cpp/cmake/threading.cmake index d1b9327a6a..e422a8ccee 100644 --- a/cpp/cmake/threading.cmake +++ b/cpp/cmake/threading.cmake @@ -28,7 +28,7 @@ if(DISABLE_TBB) message(STATUS "Intel Thread Building Blocks is disabled.") add_definitions(-DNO_TBB) else() - find_package(TBB OPTIONAL_COMPONENTS tbb) + find_package(TBB QUIET OPTIONAL_COMPONENTS tbb) if(${TBB_FOUND}) message(STATUS "Intel Thread Building Blocks is enabled.") else()