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.
>
>
There was a bug in `FindGMP.cmake` and `FindMPFR.cmake`: they were
using the undefined macro `cache_set`.
I have removed those variables definitions, and wrote the code
differently where they were used.
For the moment, the feature is far from being ready:
- in case of header-only, the .cpp sources files of CGAL libraries are
reported,
- when a dependency for a test/examples is missing, the corresponding
.cpp files is reported,
- and I have no clue which CMake version is required.
But I found real issues.
By default, the feature is OFF. It will only be activated if the CMake
variable or cache variable `CGAL_CHECK_UNUSED_CPP_FILES` is true. We
might activate it on a per-directory basis... or have it by default,
and deactivate it per-directory. We'll see. For the moment, let's keep
it deactivated.
When a user-project is compile from a Git repository, there was that
annoying warning about the project not being developed in the same branch
as CGAL itself!
In the testsuite, with `RUNNING_CGAL_AUTO_TEST`, the message will end with:
> Set CGAL_DO_NOT_WARN_ABOUT_CMAKE_BUILD_TYPE to TRUE if you want to
> disable this notice.
instead of
> disable this warning.
Because otherwise our test results are full of yellow 'w' (warnings).