Laurent said :
"That is a bug in earlier versions of TBB. It was fixed in TBB 2019 update 5. That is a bad interaction with #5687, that made the module FindTBB.cmake from CGAL search for TBB in Config mode, first."
A lot of parts of CGAL use `<thread>` in conjunction with TBB. I have
added the `find_package(Threads)` in `CGAL_target_use_TBB.cmake` for
convenience.
I have also restored FindTBB.cmake as a pure copy of
https://github.com/Kitware/VTK/blob/master/CMake/FindTBB.cmake
with that version:
> c7249fed2e73ce25fbbc53363d9caf4ab5cc9195
> Author: Cory Quammen <cory.quammen@kitware.com>
> Date: Thu Feb 14 23:21:09 2019 -0500
>
> FindTBB: handle basic linker scripts
>
> TBB binaries may define libtbb.so as a linker script of the form
>
> INPUT(libtbb.so.2)
>
> Make FindTBB find the real .so file libtbb.so points to in such cases.
>
> Approach borrowed from vtk-m/CMake/VTKmDeviceAdapters.cmake on
> suggestion from Robert Maynard.
>
>
With default CMake paths, the TBB installed in /usr/{include/,lib64/} is
found, whatever there is in TBB environment variables. If the search
with NO_DEFAULT_PATH does not find TBB, then the search is made again
with default paths.
If the debug versions are not found, the release versions will be used instead
for the debug mode.
If the tbb_malloc library is not found, doesn't link with it.
- Untabified
- Does not link with the TBB mallow proxy anymore, but set
TBB_MALLOCPROXY_DEBUG_LIBRARY and TBB_MALLOCPROXY_RELEASE_LIBRARY
so that a user can still link with it if necessary
Note: the malloc proxy is not available on MacOS.
- Calls include_directories ( ${TBB_INCLUDE_DIRS} ) and
link_directories( ${TBB_LIBRARY_DIRS} ) to set paths