mirror of https://github.com/CGAL/cgal
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.
This commit is contained in:
parent
ea408a8602
commit
8e167590c8
|
|
@ -48,7 +48,7 @@ if(OPENGL_FOUND)
|
|||
|
||||
use_essential_libs()
|
||||
|
||||
include_directories( ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} )
|
||||
include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} )
|
||||
|
||||
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ message("Configuring libCGAL_Core")
|
|||
|
||||
use_essential_libs()
|
||||
|
||||
include_directories (${CGAL_3RD_PARTY_INCLUDE_DIRS})
|
||||
include_directories (SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS})
|
||||
|
||||
add_definitions(${CGAL_3RD_PARTY_DEFINITIONS})
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ if( QT4_FOUND )
|
|||
|
||||
use_essential_libs()
|
||||
|
||||
include_directories( ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS} )
|
||||
include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS} )
|
||||
|
||||
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ if ( BLAS_FOUND AND NOT BLAS_SETUP )
|
|||
|
||||
message( STATUS "UseBLAS" )
|
||||
message( STATUS "BLAS include: ${BLAS_INCLUDE_DIR}" )
|
||||
include_directories ( ${BLAS_INCLUDE_DIR} )
|
||||
include_directories ( SYSTEM ${BLAS_INCLUDE_DIR} )
|
||||
|
||||
message( STATUS "BLAS definitions: ${BLAS_DEFINITIONS}" )
|
||||
add_definitions( ${BLAS_DEFINITIONS} )
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ if ( LAPACK_FOUND AND NOT LAPACK_SETUP )
|
|||
|
||||
message( STATUS "UseLAPACK" )
|
||||
message( STATUS "LAPACK include: ${LAPACK_INCLUDE_DIR}" )
|
||||
include_directories ( ${LAPACK_INCLUDE_DIR} )
|
||||
include_directories ( SYSTEM ${LAPACK_INCLUDE_DIR} )
|
||||
|
||||
message( STATUS "LAPACK definitions: ${LAPACK_DEFINITIONS}" )
|
||||
add_definitions( ${LAPACK_DEFINITIONS} )
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ if ( LEDA_FOUND AND NOT LEDA_SETUP )
|
|||
|
||||
message( STATUS "UseLEDA" )
|
||||
message( STATUS "LEDA include: ${LEDA_INCLUDE_DIR}" )
|
||||
include_directories ( ${LEDA_INCLUDE_DIR} )
|
||||
include_directories ( SYSTEM ${LEDA_INCLUDE_DIR} )
|
||||
|
||||
message( STATUS "LEDA definitions: ${LEDA_DEFINITIONS}" )
|
||||
add_definitions( ${LEDA_DEFINITIONS} )
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
if ( MKL_FOUND AND NOT CGAL_MKL_SETUP )
|
||||
|
||||
message( STATUS "MKL include: ${MKL_INCLUDE_DIR}" )
|
||||
include_directories ( ${MKL_INCLUDE_DIR} )
|
||||
include_directories ( SYSTEM ${MKL_INCLUDE_DIR} )
|
||||
|
||||
message( STATUS "MKL definitions: ${MKL_DEFINITIONS}" )
|
||||
add_definitions( ${MKL_DEFINITIONS} )
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ if( MPFI_FOUND AND NOT MPFI_SETUP )
|
|||
)
|
||||
|
||||
if( COMPILED_MPFI_TEST AND MPFI_TEST_RESULT EQUAL 0)
|
||||
include_directories( ${MPFI_INCLUDE_DIR} )
|
||||
include_directories( SYSTEM ${MPFI_INCLUDE_DIR} )
|
||||
link_directories( ${MPFI_LIBRARIES_DIR} )
|
||||
add_definitions( ${MPFI_DEFINITIONS} "-DCGAL_USE_MPFI" )
|
||||
link_libraries( ${MPFI_LIBRARIES} )
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ if( RS_FOUND AND NOT RS_SETUP )
|
|||
endif( IS_OLD_GXX )
|
||||
endif( APPLE AND CMAKE_COMPILER_IS_GNUCXX )
|
||||
|
||||
include_directories ( ${RS_INCLUDE_DIR} )
|
||||
include_directories ( SYSTEM ${RS_INCLUDE_DIR} )
|
||||
add_definitions( ${RS_DEFINITIONS} "-DCGAL_USE_RS" )
|
||||
link_libraries( ${RS_LIBRARIES} )
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ if( RS3_FOUND AND NOT RS3_SETUP )
|
|||
message( STATUS "RS3 definitions: ${RS3_DEFINITIONS}" )
|
||||
message( STATUS "RS3 libraries: ${RS3_LIBRARIES}" )
|
||||
|
||||
include_directories ( ${RS3_INCLUDE_DIR} )
|
||||
include_directories ( SYSTEM ${RS3_INCLUDE_DIR} )
|
||||
add_definitions( ${RS3_DEFINITIONS} "-DCGAL_USE_RS3" )
|
||||
link_libraries( ${RS3_LIBRARIES} )
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ if ( TAUCS_FOUND AND NOT TAUCS_SETUP )
|
|||
|
||||
message( STATUS "UseTAUCS" )
|
||||
message( STATUS "TAUCS include: ${TAUCS_INCLUDE_DIR}" )
|
||||
include_directories ( ${TAUCS_INCLUDE_DIR} )
|
||||
include_directories ( SYSTEM ${TAUCS_INCLUDE_DIR} )
|
||||
|
||||
message( STATUS "TAUCS definitions: ${TAUCS_DEFINITIONS}" )
|
||||
add_definitions( ${TAUCS_DEFINITIONS} "-DCGAL_USE_TAUCS" )
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ if(NOT USE_CGAL_FILE_INCLUDED)
|
|||
#message (STATUS "LIB: ${CGAL_LIBRARY}")
|
||||
#message (STATUS "LIBS: ${CGAL_LIBRARIES}")
|
||||
|
||||
include_directories ( ${CGAL_INCLUDE_DIRS} ${CGAL_3RD_PARTY_INCLUDE_DIRS} )
|
||||
include_directories ( ${CGAL_INCLUDE_DIRS})
|
||||
include_directories ( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} )
|
||||
add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_DEFINITIONS} )
|
||||
|
||||
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# This module setups the compiler for using ESBTL library.
|
||||
# It assumes that find_package(ESBTL) was already called.
|
||||
|
||||
include_directories( ${ESBTL_INCLUDE_DIR} )
|
||||
include_directories( SYSTEM ${ESBTL_INCLUDE_DIR} )
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# It assumes that find_package(Eigen3) was already called.
|
||||
|
||||
|
||||
include_directories( ${EIGEN3_INCLUDE_DIR} )
|
||||
include_directories( SYSTEM ${EIGEN3_INCLUDE_DIR} )
|
||||
|
||||
add_definitions(-DCGAL_EIGEN3_ENABLED)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ message("Configuring libCGAL")
|
|||
|
||||
use_essential_libs()
|
||||
|
||||
include_directories (${CGAL_3RD_PARTY_INCLUDE_DIRS})
|
||||
include_directories (SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS})
|
||||
|
||||
add_definitions(${CGAL_3RD_PARTY_DEFINITIONS})
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ if( QT3_FOUND )
|
|||
|
||||
use_essential_libs()
|
||||
|
||||
include_directories( ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS} )
|
||||
include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS} )
|
||||
|
||||
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue