That feature can be enabled with g++, clang++, and icpc (intel). It could
be implemented for MSVC, with the flag /Zs, but that is not yet done (and
probably will not).
The option is controlled by a CMake option, CGAL_ENABLE_CHECK_HEADERS, that
is disabled by default. If that option is enabled by the user, then CMake
will check if the compiler $CXX understand the syntax:
$CXX -x c++ -fsyntax-only CGAL/header.h
and send an error otherwise.
Then phony targets will be created:
- a target check_CGAL__header_h for each header <CGAL/header.h>,
- a target check_pkg_<pkg> for each package <pgk>,
- and a target check_headers for the whole CGAL.
Those new targets currently give a lot of compilation errors if
CGAL_ENABLE_CHECK_HEADERS is enabled!
+ fix several missing includes in Mesh_2.
That is a followup-to my commit last year:
| ------------------------------------------------------------------------
| r63198 | lrineau | 2011-04-28 19:45:22 +0200 (Thu, 28 Apr 2011) | 5 lines
|
| Try to fix my last revision about cmake_policy, with CMake-2.6.x
|
| CMake gives an error if one tries to use cmake_policy(VERSION x.y.z) if
| x.y.z is greater than the current CMake version.
|
| ------------------------------------------------------------------------
The following check:
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
is useless just after a call to:
cmake_minimum_required(VERSION 2.6.2)
The script used to fix that was:
#!/usr/bin/env perl
$replacement=<<'END';
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
cmake_policy(VERSION 2.8.4)
else()
cmake_policy(VERSION 2.6)
endif()
END
while(<>) {
if(/if\("\${CMAKE_MAJOR_VERSION}.\${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6\)/) {
while(<>) {
if(/^endif\(\)/) {
print "$replacement";
while(<>) {
print;
}
exit 0
}
}
}
print;
}
If CGAL_ENABLE_PRECONFIG is set to OFF, currently the CMake configuration
fails. That option is turned into an internal cache variable set to ON by
default.
When the value of the Boolean cache variable BUILD_SHARED_LIBS is modified,
there was a bug that the variable CGAL_LIBRARY_NAME,
CGAL_Core_LIBRARY_NAME, CGAL_Qt4_LIBRARY_NAME, and so on, were not
updated. As a consequence, the file CGALConfig.cmake produced in the
installation directory was not correct: it was referring to .so files
whereas the installed binaries were .a files, or the reverse.
This patch fixes the issue.
There was an explicit
unset(WITH_CGAL_Core)
in the CMake scripts of CGAL. It was introduced to workaround an issue in
our testsuite process. I turned it into an EXCLUDE WITH_CGAL_Core in the
command load_cache that is used by our testsuite process.
| ------------------------------------------------------------------------
| r67597 | lrineau | 2012-02-03 18:13:17 +0100 (Fri, 03 Feb 2012) | 1 line
|
| Do not install scripts/cgal_create_assertions.sh scripts/cgal_create_cmake_script_with_options
| ------------------------------------------------------------------------
Use full-path for scripts.