From c30c35571fb141b2168d2840494dbc2544c66194 Mon Sep 17 00:00:00 2001 From: Vicente Adolfo Bolea Sanchez Date: Thu, 4 Aug 2022 13:58:01 -0400 Subject: [PATCH] Revert "Disable loading the TBBConfig.cmake file" This reverts commit a8825db59a7235c9d267ac4f909bd2eebb25cb40. --- CMake/FindTBB.cmake | 49 +++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/CMake/FindTBB.cmake b/CMake/FindTBB.cmake index 95cc79586..bd7563131 100644 --- a/CMake/FindTBB.cmake +++ b/CMake/FindTBB.cmake @@ -70,32 +70,29 @@ # Use TBBConfig.cmake if possible. -# Disabling this as it running the TBBConfig.cmake on dragnipur is -# causing a CMake error. I don't know if this is an install problem -# or an issue with version 2018.0. -# set(_tbb_find_quiet) -# if (TBB_FIND_QUIETLY) -# set(_tbb_find_quiet QUIET) -# endif () -# set(_tbb_find_components) -# set(_tbb_find_optional_components) -# foreach (_tbb_find_component IN LISTS TBB_FIND_COMPONENTS) -# if (TBB_FIND_REQUIRED_${_tbb_find_component}) -# list(APPEND _tbb_find_components "${_tbb_find_component}") -# else () -# list(APPEND _tbb_find_optional_components "${_tbb_find_component}") -# endif () -# endforeach () -# unset(_tbb_find_component) -# find_package(TBB CONFIG ${_tbb_find_quiet} -# COMPONENTS ${_tbb_find_components} -# OPTIONAL_COMPONENTS ${_tbb_find_optional_components}) -# unset(_tbb_find_quiet) -# unset(_tbb_find_components) -# unset(_tbb_find_optional_components) -# if (TBB_FOUND) -# return () -# endif () +set(_tbb_find_quiet) +if (TBB_FIND_QUIETLY) + set(_tbb_find_quiet QUIET) +endif () +set(_tbb_find_components) +set(_tbb_find_optional_components) +foreach (_tbb_find_component IN LISTS TBB_FIND_COMPONENTS) + if (TBB_FIND_REQUIRED_${_tbb_find_component}) + list(APPEND _tbb_find_components "${_tbb_find_component}") + else () + list(APPEND _tbb_find_optional_components "${_tbb_find_component}") + endif () +endforeach () +unset(_tbb_find_component) +find_package(TBB CONFIG ${_tbb_find_quiet} + COMPONENTS ${_tbb_find_components} + OPTIONAL_COMPONENTS ${_tbb_find_optional_components}) +unset(_tbb_find_quiet) +unset(_tbb_find_components) +unset(_tbb_find_optional_components) +if (TBB_FOUND) + return () +endif () #==================================================== # Fix the library path in case it is a linker script