If the current working directory is a checkout of a commit that is not a
branch, for example, a commit in the ancestors of a branch, then CGAL CMake
scripts gave that CMake error:
== CMake setup ==
fatal: ref HEAD is not a symbolic ref
CMake Error at Installation/cmake/modules/CGAL_SCM.cmake:36 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.
Call Stack (most recent call first):
CMakeLists.txt:17 (include)
== CMake setup (DONE) ==
This patch fixes the error. If HEAD is not a branch, then CGAL_GIT_BRANCH
is equal to "HEAD".
- proper indentation
- merge double occurences
- standardize location at the end block, before DOC
tested with GMP(XX), MPFR, MPFI, LEDA, RS(3), NTL and a (small) number of ways to specify library
locations via environment and CMake variables, on Debian 64bit
removed almost all occurenced (missing UseFiles). While
doing so, some CMakeLists.txt could also be simplified. In fact
many more CMakeLists.txt can be simplified, in one of two ways:
1) add external libs to CGAL_3RD_PARTY_LIBRARIES and
2) call cgal_create_single_source_program
A FindFoobar module must not include a UseFoobar file. CGAL_UseRS3 now
includes CGAL_UseMPFI, and not FindRS and FindRS3.
+ Fix also a typo in a message of FindRS3.
gcc has an option -isystem, that can replace -I. The documentation is:
-isystem dir
Search dir for header files, after all directories specified by -I but
before the standard system directories. Mark it as a system directory,
so that it gets the same special treatment as is applied to the
standard system directories. If dir begins with "=", then the "=" will
be replaced by the sysroot prefix; see --sysroot and -isysroot.
The "special treatment" means that gcc will not warn about constructions in
headers in directories pointed by -isystem instead of -I.
In the CGAL testsuite, there are a lot of warnings that comes from
third-party libraries (mostly from Boost, but also from Eigen).
This patch tells cmake to use -isystem with gcc, for all CGAL 3rd-party
directories.
to the FindQt3 module shipped with CMake
CGAL FindQt3-patched module uses the prefix QT3_ for all cache variables,
instead of just QT_. That allows to use Qt3 and Qt4 in the same project
(but for different binaries of course).
As of Boost 1.50 it is required to link Boost.System with CGAL. System
has been a Thread dependency all along and we simply never linked to
it and apparently got lucky.
Add it to the dependencies, add it in the manual and INSTALL file.
instead of including the file I've just added the general cmake makro to
check whether an item is in the list. Why does it need a macro? There should
be a list-operation for that ...