From 46fa2832903390e9317c7e5741c91bc6a88416e5 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 11 Feb 2018 09:55:53 -0600 Subject: [PATCH] CMake: Use -isystem in INSOURCE_SETUP_TARGET macro --- cmake/macros/macro_deal_ii_insource_setup_target.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/macros/macro_deal_ii_insource_setup_target.cmake b/cmake/macros/macro_deal_ii_insource_setup_target.cmake index 4c7efcb00b..35485e54bb 100644 --- a/cmake/macros/macro_deal_ii_insource_setup_target.cmake +++ b/cmake/macros/macro_deal_ii_insource_setup_target.cmake @@ -31,13 +31,14 @@ MACRO(DEAL_II_INSOURCE_SETUP_TARGET _target _build) LINKER_LANGUAGE "CXX" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) - SET_PROPERTY(TARGET ${_target} APPEND PROPERTY - INCLUDE_DIRECTORIES + + TARGET_INCLUDE_DIRECTORIES(${_target} + PRIVATE "${CMAKE_BINARY_DIR}/include" "${CMAKE_SOURCE_DIR}/include" ${DEAL_II_BUNDLED_INCLUDE_DIRS} - ${DEAL_II_INCLUDE_DIRS} ) + TARGET_INCLUDE_DIRECTORIES(${_target} SYSTEM PRIVATE ${DEAL_II_INCLUDE_DIRS}) IF(CMAKE_VERSION VERSION_LESS 3.9 OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC") SET_PROPERTY(TARGET ${_target} APPEND_STRING PROPERTY -- 2.39.5