Disable loading the TBBConfig.cmake file

Sourcing the file installed on dragnipur is causing a CMake error. I
don't know if it is an install error or a problem with FindTBB.cmake,
but this should get around the problem by just using the "old" method
for finding TBB.
This commit is contained in:
Kenneth Moreland 2021-06-09 07:08:53 -06:00
parent 5eb688da2a
commit a8825db59a

@ -70,29 +70,32 @@
# Use TBBConfig.cmake if possible. # Use TBBConfig.cmake if possible.
set(_tbb_find_quiet) # Disabling this as it running the TBBConfig.cmake on dragnipur is
if (TBB_FIND_QUIETLY) # causing a CMake error. I don't know if this is an install problem
set(_tbb_find_quiet QUIET) # or an issue with version 2018.0.
endif () # set(_tbb_find_quiet)
set(_tbb_find_components) # if (TBB_FIND_QUIETLY)
set(_tbb_find_optional_components) # set(_tbb_find_quiet QUIET)
foreach (_tbb_find_component IN LISTS TBB_FIND_COMPONENTS) # endif ()
if (TBB_FIND_REQUIRED_${_tbb_find_component}) # set(_tbb_find_components)
list(APPEND _tbb_find_components "${_tbb_find_component}") # set(_tbb_find_optional_components)
else () # foreach (_tbb_find_component IN LISTS TBB_FIND_COMPONENTS)
list(APPEND _tbb_find_optional_components "${_tbb_find_component}") # if (TBB_FIND_REQUIRED_${_tbb_find_component})
endif () # list(APPEND _tbb_find_components "${_tbb_find_component}")
endforeach () # else ()
unset(_tbb_find_component) # list(APPEND _tbb_find_optional_components "${_tbb_find_component}")
find_package(TBB CONFIG ${_tbb_find_quiet} # endif ()
COMPONENTS ${_tbb_find_components} # endforeach ()
OPTIONAL_COMPONENTS ${_tbb_find_optional_components}) # unset(_tbb_find_component)
unset(_tbb_find_quiet) # find_package(TBB CONFIG ${_tbb_find_quiet}
unset(_tbb_find_components) # COMPONENTS ${_tbb_find_components}
unset(_tbb_find_optional_components) # OPTIONAL_COMPONENTS ${_tbb_find_optional_components})
if (TBB_FOUND) # unset(_tbb_find_quiet)
return () # unset(_tbb_find_components)
endif () # unset(_tbb_find_optional_components)
# if (TBB_FOUND)
# return ()
# endif ()
#==================================================== #====================================================
# Fix the library path in case it is a linker script # Fix the library path in case it is a linker script