From: Matthias Maier Date: Thu, 2 Feb 2017 00:16:05 +0000 (-0600) Subject: CMake: Use -isystem for third party headers X-Git-Tag: v9.0.0-rc1~444^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30e56733585d94aac39603af14faf5058232cf3c;p=dealii.git CMake: Use -isystem for third party headers --- diff --git a/cmake/macros/macro_deal_ii_setup_target.cmake b/cmake/macros/macro_deal_ii_setup_target.cmake index cd1601e163..597f4360af 100644 --- a/cmake/macros/macro_deal_ii_setup_target.cmake +++ b/cmake/macros/macro_deal_ii_setup_target.cmake @@ -103,9 +103,8 @@ MACRO(DEAL_II_SETUP_TARGET _target) SET(_build "RELEASE") ENDIF() - SET_PROPERTY(TARGET ${_target} APPEND PROPERTY - INCLUDE_DIRECTORIES "${DEAL_II_INCLUDE_DIRS}" - ) + TARGET_INCLUDE_DIRECTORIES(${_target} SYSTEM PRIVATE ${DEAL_II_INCLUDE_DIRS}) + SET_PROPERTY(TARGET ${_target} APPEND_STRING PROPERTY LINK_FLAGS " ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}" ) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 14c2e42fd1..cb83177466 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -23,6 +23,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR}/include/ ${CMAKE_SOURCE_DIR}/include/ ${DEAL_II_BUNDLED_INCLUDE_DIRS} + SYSTEM ${DEAL_II_INCLUDE_DIRS} )