From 9ae0d7e24bf6d6a78533ee1b61be5fca0b512949 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Sun, 20 Oct 2019 17:24:50 +0200 Subject: [PATCH] disable intel system includes fixes #8374 --- cmake/macros/macro_deal_ii_setup_target.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/macros/macro_deal_ii_setup_target.cmake b/cmake/macros/macro_deal_ii_setup_target.cmake index 716c00cdfa..20f300da93 100644 --- a/cmake/macros/macro_deal_ii_setup_target.cmake +++ b/cmake/macros/macro_deal_ii_setup_target.cmake @@ -103,7 +103,15 @@ MACRO(DEAL_II_SETUP_TARGET _target) SET(_build "RELEASE") ENDIF() - TARGET_INCLUDE_DIRECTORIES(${_target} SYSTEM PRIVATE ${DEAL_II_INCLUDE_DIRS}) + IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel") + # Intel (at least up to 19.0.5) confuses an external TBB installation with + # our selected one if we use -Isystem includes. Work around this by using + # normal includes. + # See https://github.com/dealii/dealii/issues/8374 for details. + TARGET_INCLUDE_DIRECTORIES(${_target} PRIVATE ${DEAL_II_INCLUDE_DIRS}) + ELSE() + TARGET_INCLUDE_DIRECTORIES(${_target} SYSTEM PRIVATE ${DEAL_II_INCLUDE_DIRS}) + ENDIF() SET_PROPERTY(TARGET ${_target} APPEND_STRING PROPERTY LINK_FLAGS " ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}" -- 2.39.5