Files
cgal/Installation/cmake/modules/CGAL_UseTAUCS.cmake
T
Laurent Rineau 8e167590c8 Use include_directories(SYSTEM ...) for 3rd-party libraries
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.
2012-08-01 10:53:37 +00:00

32 lines
890 B
CMake

# This module setups the compiler for the TAUCS libraries.
# It assumes that find_package(TAUCS) was already called.
if ( TAUCS_FOUND AND NOT TAUCS_SETUP )
message( STATUS "UseTAUCS" )
message( STATUS "TAUCS include: ${TAUCS_INCLUDE_DIR}" )
include_directories ( SYSTEM ${TAUCS_INCLUDE_DIR} )
message( STATUS "TAUCS definitions: ${TAUCS_DEFINITIONS}" )
add_definitions( ${TAUCS_DEFINITIONS} "-DCGAL_USE_TAUCS" )
if (TAUCS_LIBRARIES_DIR)
message( STATUS "TAUCS library directories: ${TAUCS_LIBRARIES_DIR}" )
link_directories( ${TAUCS_LIBRARIES_DIR} )
endif()
if (TAUCS_LIBRARIES)
message( STATUS "TAUCS libraries: ${TAUCS_LIBRARIES}" )
link_libraries( ${TAUCS_LIBRARIES} )
endif()
# TAUCS requires BLAS and LAPACK
include( ${LAPACK_USE_FILE} )
# Setup is done
set ( TAUCS_SETUP TRUE )
add_definitions(-DCGAL_TAUCS_ENABLED)
endif()