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.
>
>
If the environment variable `CGAL_DEV_MODE` is set to a "true" value,
according to CMake, then the `CGAL_DEV_MODE` CMake option is `ON` by
default.
https://cmake.org/Wiki/CMake/Language_Syntax#CMake_supports_boolean_variables.
> CMake considers an empty string, "FALSE", "OFF", "NO", or any string
> ending in "-NOTFOUND" to be false. [..] Other values are true.
CMake does not like that the documentation of a CMake cache variable is
multiline. That triggers an error once the cache is re-loaded, the second
time.
Previously there was a variable CGAL_SHARED_LIBS defined by
CGALConfig.cmake. This one is now unified with CGAL_BUILD_SHARED_LIBS.
And the option CGAL_BUILD_SHARED_LIBS is only defined as an option if one
are building CGAL libraries. If CGAL_Common.cmake is included from another
project, such as from UseCGAL.cmake, then this variable is set in
CGALConfig.cmake as a regular (non-cached) CMake variable.
We declare
cmake_minimum_required(VERSION 2.6.2)
but we also use
cmake_policy(VERSION 2.8.4)
to declare that our CMake scripts are OK with all the defaults of CMake policies
as of CMake-2.8.4. That shuts down the warnings of CMake-2.8.4.
That way, we no longer need any declaration of specific policies.