From e4f621c35057603a83afc4dc843fd625b42a1d91 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 15 Feb 2023 10:12:25 -0500 Subject: [PATCH] Include bundled include directories as CMake SYSTEM paths --- bundled/CMakeLists.txt | 5 ----- cmake/macros/macro_deal_ii_add_library.cmake | 5 +++++ cmake/macros/macro_insource_setup_target.cmake | 5 +++-- contrib/python-bindings/source/CMakeLists.txt | 2 +- include/deal.II/arborx/bvh.h | 3 --- include/deal.II/arborx/distributed_tree.h | 2 -- include/deal.II/base/memory_space.h | 2 -- include/deal.II/base/memory_space_data.h | 2 -- tests/quick_tests/kokkos.cc | 3 +-- 9 files changed, 10 insertions(+), 19 deletions(-) diff --git a/bundled/CMakeLists.txt b/bundled/CMakeLists.txt index c922570200..71d4aaceb0 100644 --- a/bundled/CMakeLists.txt +++ b/bundled/CMakeLists.txt @@ -19,11 +19,6 @@ message(STATUS "Setting up bundled features") -include_directories( - ${DEAL_II_BUNDLED_INCLUDE_DIRS} - ${DEAL_II_INCLUDE_DIRS} - ) - if(DEAL_II_FEATURE_BOOST_BUNDLED_CONFIGURED) add_subdirectory(${BOOST_FOLDER}/libs/serialization/src) add_subdirectory(${BOOST_FOLDER}/libs/system/src) diff --git a/cmake/macros/macro_deal_ii_add_library.cmake b/cmake/macros/macro_deal_ii_add_library.cmake index 87a9fd9fca..e5e3f2cc19 100644 --- a/cmake/macros/macro_deal_ii_add_library.cmake +++ b/cmake/macros/macro_deal_ii_add_library.cmake @@ -48,6 +48,11 @@ macro(deal_ii_add_library _library) PUBLIC ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}} ) + target_include_directories(${_library}_${_build_lowercase} + PUBLIC ${DEAL_II_INCLUDE_DIRS}) + target_include_directories(${_library}_${_build_lowercase} + SYSTEM PUBLIC ${DEAL_II_BUNDLED_INCLUDE_DIRS}) + set_property(GLOBAL APPEND PROPERTY DEAL_II_OBJECTS_${_build} "$" ) diff --git a/cmake/macros/macro_insource_setup_target.cmake b/cmake/macros/macro_insource_setup_target.cmake index 556fecaf0d..e765cb5e67 100644 --- a/cmake/macros/macro_insource_setup_target.cmake +++ b/cmake/macros/macro_insource_setup_target.cmake @@ -36,9 +36,10 @@ function(insource_setup_target _target _build) PRIVATE "${CMAKE_BINARY_DIR}/include" "${CMAKE_SOURCE_DIR}/include" - ${DEAL_II_BUNDLED_INCLUDE_DIRS} ) - target_include_directories(${_target} SYSTEM PRIVATE ${DEAL_II_INCLUDE_DIRS}) + target_include_directories(${_target} + SYSTEM PRIVATE ${DEAL_II_INCLUDE_DIRS} ${DEAL_II_BUNDLED_INCLUDE_DIRS} + ) set(_flags "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}") separate_arguments(_flags) diff --git a/contrib/python-bindings/source/CMakeLists.txt b/contrib/python-bindings/source/CMakeLists.txt index 1f04fdbaff..ca1fd416df 100644 --- a/contrib/python-bindings/source/CMakeLists.txt +++ b/contrib/python-bindings/source/CMakeLists.txt @@ -16,10 +16,10 @@ include_directories( ${CMAKE_BINARY_DIR}/include/ ${CMAKE_SOURCE_DIR}/include/ - ${DEAL_II_BUNDLED_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/contrib/python-bindings/include/ SYSTEM ${DEAL_II_INCLUDE_DIRS} + ${DEAL_II_BUNDLED_INCLUDE_DIRS} ) # diff --git a/include/deal.II/arborx/bvh.h b/include/deal.II/arborx/bvh.h index 8cc4d6e053..dbd895bb4f 100644 --- a/include/deal.II/arborx/bvh.h +++ b/include/deal.II/arborx/bvh.h @@ -22,10 +22,7 @@ # include # include - -DEAL_II_DISABLE_EXTRA_DIAGNOSTICS # include -DEAL_II_ENABLE_EXTRA_DIAGNOSTICS DEAL_II_NAMESPACE_OPEN diff --git a/include/deal.II/arborx/distributed_tree.h b/include/deal.II/arborx/distributed_tree.h index 5e5c5b4ff0..2dba72b548 100644 --- a/include/deal.II/arborx/distributed_tree.h +++ b/include/deal.II/arborx/distributed_tree.h @@ -22,9 +22,7 @@ # include # include -DEAL_II_DISABLE_EXTRA_DIAGNOSTICS # include -DEAL_II_ENABLE_EXTRA_DIAGNOSTICS DEAL_II_NAMESPACE_OPEN diff --git a/include/deal.II/base/memory_space.h b/include/deal.II/base/memory_space.h index 2a42940dee..91c87d9f8f 100644 --- a/include/deal.II/base/memory_space.h +++ b/include/deal.II/base/memory_space.h @@ -19,9 +19,7 @@ #include -DEAL_II_DISABLE_EXTRA_DIAGNOSTICS #include -DEAL_II_ENABLE_EXTRA_DIAGNOSTICS DEAL_II_NAMESPACE_OPEN diff --git a/include/deal.II/base/memory_space_data.h b/include/deal.II/base/memory_space_data.h index f30bbb32a1..827500bdcb 100644 --- a/include/deal.II/base/memory_space_data.h +++ b/include/deal.II/base/memory_space_data.h @@ -23,9 +23,7 @@ #include #include -DEAL_II_DISABLE_EXTRA_DIAGNOSTICS #include -DEAL_II_ENABLE_EXTRA_DIAGNOSTICS #include #include diff --git a/tests/quick_tests/kokkos.cc b/tests/quick_tests/kokkos.cc index 8bce488af2..28f190b129 100644 --- a/tests/quick_tests/kokkos.cc +++ b/tests/quick_tests/kokkos.cc @@ -1,8 +1,7 @@ #include -DEAL_II_DISABLE_EXTRA_DIAGNOSTICS + #include -DEAL_II_ENABLE_EXTRA_DIAGNOSTICS struct FillFunctor { -- 2.39.5