From 6d4f8ac3901a4a46efd5f4c80b5cdaece4803085 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 2 Mar 2023 07:41:13 -0600 Subject: [PATCH] CMake: Bugfix: include bundled include files with -isystem --- cmake/macros/macro_populate_target_properties.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/macros/macro_populate_target_properties.cmake b/cmake/macros/macro_populate_target_properties.cmake index 83b0f6688c..0a56dc2944 100644 --- a/cmake/macros/macro_populate_target_properties.cmake +++ b/cmake/macros/macro_populate_target_properties.cmake @@ -53,7 +53,7 @@ function(populate_target_properties _target _build) target_link_libraries(${_target} ${_visibility} ${DEAL_II_LIBRARIES} ${DEAL_II_LIBRARIES_${_build}} - ${DEAL_II_TARGETS} ${DEAL_II_TARGETS_${_build}} + ${DEAL_II_TARGETS} ${DEAL_II_TARGETS_${_build}} ) # @@ -68,6 +68,8 @@ function(populate_target_properties _target _build) target_include_directories(${_target} PRIVATE ${CMAKE_BINARY_DIR}/include ${CMAKE_SOURCE_DIR}/include + ) + target_include_directories(${_target} SYSTEM PRIVATE ${DEAL_II_BUNDLED_INCLUDE_DIRS} ) @@ -85,7 +87,7 @@ function(populate_target_properties _target _build) if(NOT "${DEAL_II_BUNDLED_INCLUDE_DIRS}" STREQUAL "") list(APPEND _includes "$") endif() - target_include_directories(${_target} INTERFACE ${_includes}) + target_include_directories(${_target} SYSTEM INTERFACE ${_includes}) endif() target_compile_definitions(${_target} ${_visibility} -- 2.39.5