]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bugfix: include bundled include files with -isystem
authorMatthias Maier <tamiko@43-1.org>
Thu, 2 Mar 2023 13:41:13 +0000 (07:41 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 17 Mar 2023 12:44:53 +0000 (07:44 -0500)
cmake/macros/macro_populate_target_properties.cmake

index 83b0f6688c819ec644df0829ef93d3171ef58020..0a56dc294484974508b1781e6826ed2ba1b76889 100644 (file)
@@ -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 "$<INSTALL_INTERFACE:\${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled>")
     endif()
-    target_include_directories(${_target} INTERFACE ${_includes})
+    target_include_directories(${_target} SYSTEM INTERFACE ${_includes})
   endif()
 
   target_compile_definitions(${_target} ${_visibility}

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.