The CMake variable `CGAL_BRANCH_BUILD` was an option. But if
the variable was set to `FALSE`, that lead to a CMake error
automatically. This commit fixes that situation by turning the
option into an internal cache value, that cannot be set to FALSE.
Use WORKING_DIRECTORY! That is more robust: if the branch root is a symlink
that works too.
execute_process(COMMAND "${SVN_EXECUTABLE}" info --xml
WORKING_DIRECTORY "${dir}"
...)
At the first run of CMake, CGAL_INSTALLATION_PACKAGE_DIR is not known when
Subversion_GET_REVISION and Subversion_GET_URL are called. That gives an
svn error, that is fixed at the second run of CMake. Use CMAKE_SOURCE_DIR
and CMAKE_CURRENT_SOURCE_DIR instead.
... into a new function Subversion_GET_INFO. The function
Subversion_GET_REVISION is also moved to <branch_root>/CMakeLists.txt
instead of <branch_root>/Installation/CMakeLists.txt, because that function
is used only in the case of a branch-build anyway.
The documentation of CGAL says that the minimal version of CMake must be
CMake-2.6.2.
- change cmake_minimum_required to VERSION 2.6.2
- no longer any need for the policy CMP0003 (was for 2.4.x)
- no longer any need for CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS (was for 2.4)