]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: avoid adding ${DEAL_II_BUNDLED_INCLUDE_DIRS} to bundled targets
authorMatthias Maier <tamiko@43-1.org>
Thu, 22 Jun 2023 01:41:53 +0000 (20:41 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 22 Jun 2023 14:52:38 +0000 (09:52 -0500)
These include files should only be added as system include directories
to dependend targets and not to the bundled targets themselves.

While this commit looks purely aesthetic, this commit actually works
around an obscure compiler bug with ICC 19 that otherwises errors out
with when trying to compile our bundled tbb library.

cmake/macros/macro_populate_target_properties.cmake

index edd794a706f2863fb24b1e16f0c73479b8f8f862..c85f4f070841a0e99d037f7b4e1a30651b9a47cb 100644 (file)
@@ -62,9 +62,17 @@ function(populate_target_properties _target _build)
     ${CMAKE_BINARY_DIR}/include
     ${CMAKE_SOURCE_DIR}/include
     )
-  target_include_directories(${_target} SYSTEM PRIVATE
-    ${DEAL_II_BUNDLED_INCLUDE_DIRS}
-    )
+
+  #
+  # Do not add bundled include directories to bundled_ targets. First of
+  # all this is unnecessary, secondly, this severly trips up ICC-19 that
+  # cannot handle the additional -isystem include properly...
+  #
+  if(NOT "${_target}" MATCHES "^bundled_")
+    target_include_directories(${_target} SYSTEM PRIVATE
+      ${DEAL_II_BUNDLED_INCLUDE_DIRS}
+      )
+  endif()
 
   # Interface includes:
 

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.