From: Matthias Maier Date: Thu, 2 Mar 2023 13:41:13 +0000 (-0600) Subject: CMake: Bugfix: include bundled include files with -isystem X-Git-Tag: v9.5.0-rc1~446^2~16 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d4f8ac3901a4a46efd5f4c80b5cdaece4803085;p=dealii.git CMake: Bugfix: include bundled include files with -isystem --- 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}