Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr-cc-refactoring' into pr-cc-re…
Browse files Browse the repository at this point in the history
…factoring
  • Loading branch information
fbischoff committed Dec 11, 2023
2 parents ce9ce21 + 7568ce3 commit d964433
Showing 1 changed file with 25 additions and 26 deletions.
51 changes: 25 additions & 26 deletions cmake/modules/FindTBB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,32 +73,6 @@
# FindTBB helper functions and macros
#

# Use TBBConfig.cmake if possible.

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
#====================================================
Expand Down Expand Up @@ -238,6 +212,31 @@ set(TBB_PREFIX_PATH ${TBBROOT} ${ENV_TBBROOT})
set(TBB_INC_SEARCH_PATH "")
set(TBB_LIB_SEARCH_PATH "")

# Use TBBConfig.cmake if possible.
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}
HINTS ${TBB_PREFIX_PATH})
unset(_tbb_find_quiet)
unset(_tbb_find_components)
unset(_tbb_find_optional_components)
if (TBB_FOUND)
return ()
endif ()

# If user built from sources
set(TBB_BUILD_PREFIX $ENV{TBB_BUILD_PREFIX})
Expand Down

0 comments on commit d964433

Please sign in to comment.