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).
When CGAL_Qt5 or CGAL_Core targets are imported, then we need to call
`find_package(Qt5)` and `find_package(Boost)` to re-import the
targets of Qt5 or `Boost::thread`.
Otherwise, there is that CMake warning:
CMake Warning (dev) at /mnt/testsuite/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake:49 (add_executable):
Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target. Run "cmake --help-policy CMP0028" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
Target "test_Min_circle" links to target "Boost::thread" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
Call Stack (most recent call first):
CMakeLists.txt:22 (create_single_source_cgal_program)
This warning is for project developers. Use -Wno-dev to suppress it.
and then that link error:
/usr/bin/ld: cannot find -lBoost::thread
Ref:
https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.12-Ic-200/Bounding_volumes/TestReport_lrineau_Fedora-Release.gz
When `CGAL_HEADER_ONLY` and `WITH_{examples|tests|demos}`, then only
the first call to `find_package(CGAL)` does the job. The subsequent
calls return very fast, by caching the results in global properties.
When `WITH_{examples|demos|tests}` is `ON`, `CGAL_SCM.cmake` is
included by each sub-directory. With this patch, the values of
`CGAL_SCM_BRANCH_NAME` and `CGAL_CREATED_GIT_HASH` are stored in
global properties, and retrieved, instead of forking two `git` at each
use of the module.
Fix the issue "CMake error when WITH_CGAL_Qt5 is set to ON then
OFF" (#1580).
The previous CMake code was using a `file(GLOB)` to discover the list
of configured libraries, whereas that list is known by CMake.
List of the fixes:
- The headers from the .cpp files were not processed (wrong regular
expression for `awk`),
- `CGAL_COMPUTE_DEPENDENCIES` is now removed (unified with
`CGAL_ENABLE_CHECK_HEADERS`).
- All `dependencies` files has an empty line (because of
`include/CGAL/version.h` in the build directory).
- Fix the name of the target `pkg_<package>_deps`
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.