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.
42 lines
1.2 KiB
CMake
42 lines
1.2 KiB
CMake
# This module setups the compiler for the LAPACK libraries.
|
|
# It assumes that find_package(LAPACK) was already called.
|
|
|
|
if ( LAPACK_FOUND AND NOT LAPACK_SETUP )
|
|
|
|
message( STATUS "UseLAPACK" )
|
|
message( STATUS "LAPACK include: ${LAPACK_INCLUDE_DIR}" )
|
|
include_directories ( SYSTEM ${LAPACK_INCLUDE_DIR} )
|
|
|
|
message( STATUS "LAPACK definitions: ${LAPACK_DEFINITIONS}" )
|
|
add_definitions( ${LAPACK_DEFINITIONS} )
|
|
if ( "${LAPACK_DEFINITIONS}" MATCHES ".*LAPACK_USE_F2C.*" )
|
|
add_definitions( "-DCGAL_USE_F2C" )
|
|
endif()
|
|
|
|
if (LAPACK_LIBRARIES_DIR)
|
|
message( STATUS "LAPACK library directories: ${LAPACK_LIBRARIES_DIR}" )
|
|
link_directories( ${LAPACK_LIBRARIES_DIR} )
|
|
endif()
|
|
if (LAPACK_LIBRARIES)
|
|
message( STATUS "LAPACK libraries: ${LAPACK_LIBRARIES}" )
|
|
link_libraries( ${LAPACK_LIBRARIES} )
|
|
endif()
|
|
|
|
message( STATUS "LAPACK link flags: ${LAPACK_LINKER_FLAGS}" )
|
|
if ( BUILD_SHARED_LIBS )
|
|
uniquely_add_flags( CMAKE_SHARED_LINKER_FLAGS ${LAPACK_LINKER_FLAGS} )
|
|
else()
|
|
uniquely_add_flags( CMAKE_MODULE_LINKER_FLAGS ${LAPACK_LINKER_FLAGS} )
|
|
endif()
|
|
|
|
# LAPACK requires BLAS
|
|
include( ${BLAS_USE_FILE} )
|
|
|
|
# Setup is done
|
|
set ( LAPACK_SETUP TRUE )
|
|
|
|
add_definitions(-DCGAL_LAPACK_ENABLED)
|
|
|
|
endif()
|
|
|