From 30e56733585d94aac39603af14faf5058232cf3c Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 1 Feb 2017 18:16:05 -0600 Subject: [PATCH] CMake: Use -isystem for third party headers --- cmake/macros/macro_deal_ii_setup_target.cmake | 5 ++--- source/CMakeLists.txt | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) 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} ) -- 2.39.5