--- /dev/null
+## ------------------------------------------------------------------------
+##
+## SPDX-License-Identifier: LGPL-2.1-or-later
+## Copyright (C) 2012 - 2023 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## Part of the source code is dual licensed under Apache-2.0 WITH
+## LLVM-exception OR LGPL-2.1-or-later. Detailed license information
+## governing the source code and code contributions can be found in
+## LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
+##
+## ------------------------------------------------------------------------
+
+#
+# collect_source_and_header_files("<souce files>" "<header files>")
+#
+# This macro appends a list of sources and header files to the global
+# properties DEAL_II_SOURCE_FILES and DEAL_II_HEADER_FILES.
+#
+
+function(collect_source_and_header_files _sources _headers)
+
+ #
+ # Drop empty strings and check whether the first list element is an
+ # absolute path. If not, then prepend the CMAKE_CURRENT_SOURCE_DIR to the
+ # path:
+ #
+ foreach(_list_name _sources _headers)
+ list(REMOVE_ITEM ${_list_name} "")
+
+ if(NOT "${${_list_name}}" STREQUAL "")
+ list(GET ${_list_name} 0 _first_element)
+ if(NOT IS_ABSOLUTE ${_first_element})
+ list(TRANSFORM ${_list_name} PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/")
+ endif()
+ endif()
+ endforeach()
+
+ set_property(GLOBAL APPEND PROPERTY DEAL_II_SOURCE_FILES ${_sources})
+ set_property(GLOBAL APPEND PROPERTY DEAL_II_HEADER_FILES ${_headers})
+endfunction()
define_object_library(object_algorithms OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_algorithms "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_arborx OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_arborx "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
${CMAKE_BINARY_DIR}/include/deal.II/base/config.h
)
expand_instantiations(object_base "${_inst}")
+
+collect_source_and_header_files("${_unity_include_src};${_separate_src}" "${_header}")
define_object_library(object_cgal OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_cgal "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_differentiation_ad OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_differentiation_ad "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_differentiation_sd OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_differentiation_sd "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
)
-
file(GLOB _header
${CMAKE_SOURCE_DIR}/include/deal.II/distributed/*.h
)
define_object_library(object_distributed OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_distributed "${_inst}")
+
+collect_source_and_header_files("${_unity_include_src};${_separate_src}" "${_header}")
define_object_library(object_dofs OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_dofs "${_inst}")
+
+collect_source_and_header_files("${_unity_include_src};${_separate_src}" "${_header}")
define_object_library(object_fe OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_fe "${_inst}")
+
+collect_source_and_header_files("${_unity_include_src};${_separate_src}" "${_header}")
define_object_library(object_gmsh OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_gmsh "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_grid OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_grid "${_inst}")
+
+collect_source_and_header_files("${_unity_include_src};${_separate_src}" "${_header}")
define_object_library(object_hp OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_hp "${_inst}")
+
+collect_source_and_header_files("${_unity_include_src};${_separate_src}" "${_header}")
)
define_object_library(object_integrators OBJECT ${_src} ${_header})
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_lac OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_lac "${_inst}")
+
+collect_source_and_header_files("${_unity_include_src};${_separate_src}" "${_header}")
define_object_library(object_matrix_free OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_matrix_free "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_meshworker OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_meshworker "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_multigrid OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_multigrid "${_inst}")
+
+collect_source_and_header_files("${_unity_include_src};${_separate_src}" "${_header}")
define_object_library(object_non_matching OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_non_matching "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_numerics OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_numerics "${_inst}")
+
+collect_source_and_header_files("${_unity_include_src};${_separate_src}" "${_header}")
define_object_library(object_opencascade OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_opencascade "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_rol OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_rol "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_particles OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_particles "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_physics OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_physics "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_physics_elasticity OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_physics_elasticity "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_sundials OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_sundials "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")
define_object_library(object_trilinos OBJECT ${_src} ${_header} ${_inst})
expand_instantiations(object_trilinos "${_inst}")
+
+collect_source_and_header_files("${_src}" "${_header}")