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_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