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.
25 lines
658 B
CMake
25 lines
658 B
CMake
# This module setups the compiler for the MKL libraries.
|
|
# It assumes that find_package(MKL) was already called.
|
|
|
|
if ( MKL_FOUND AND NOT CGAL_MKL_SETUP )
|
|
|
|
message( STATUS "MKL include: ${MKL_INCLUDE_DIR}" )
|
|
include_directories ( SYSTEM ${MKL_INCLUDE_DIR} )
|
|
|
|
message( STATUS "MKL definitions: ${MKL_DEFINITIONS}" )
|
|
add_definitions( ${MKL_DEFINITIONS} )
|
|
if ( "${MKL_DEFINITIONS}" MATCHES ".*MKL_USE_F2C.*" )
|
|
add_definitions( "-DCGAL_USE_F2C" )
|
|
endif()
|
|
|
|
if (MKL_LIBRARIES)
|
|
message( STATUS "MKL libraries: ${MKL_LIBRARIES}" )
|
|
link_libraries( ${MKL_LIBRARIES} )
|
|
endif()
|
|
|
|
# Setup is done
|
|
set ( CGAL_MKL_SETUP TRUE )
|
|
|
|
endif()
|
|
|