Skip to content

Commit

Permalink
feat: Complete rebuild of the build system. CPM is now used for most …
Browse files Browse the repository at this point in the history
…dependencies, which is much more reliable and re-locateable than the previous setup.

Signed-off-by: Franz R. Sattler <[email protected]>
  • Loading branch information
Franz R. Sattler committed Dec 31, 2024
1 parent 429dcd7 commit d7aacdf
Show file tree
Hide file tree
Showing 35 changed files with 6,009 additions and 345 deletions.
27 changes: 3 additions & 24 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,39 +1,18 @@
[submodule "external/autodiff"]
path = external/autodiff
url = https://github.com/autodiff/autodiff.git
[submodule "external/sundials"]
path = external/sundials
url = https://github.com/LLNL/sundials.git
[submodule "external/Catch2"]
path = external/Catch2
url = https://github.com/catchorg/Catch2.git
[submodule "external/rapidcsv"]
path = external/rapidcsv
url = https://github.com/d99kris/rapidcsv.git
[submodule "external/kokkos"]
path = external/kokkos
url = https://github.com/kokkos/kokkos.git
[submodule "external/rmm"]
path = external/rmm
url = https://github.com/rapidsai/rmm.git
[submodule "external/dealii"]
path = external/dealii
url = https://github.com/dealii/dealii.git
[submodule "external/boost"]
path = external/boost
url = https://github.com/boostorg/boost.git
[submodule "external/spdlog"]
path = external/spdlog
url = https://github.com/gabime/spdlog.git
[submodule "external/eigen"]
path = external/eigen
url = https://gitlab.com/libeigen/eigen
[submodule "external/qmc"]
path = external/qmc
url = https://github.com/mppmu/qmc.git
[submodule "external/thread-pool"]
path = external/thread-pool
url = https://github.com/bshoshany/thread-pool.git
[submodule "external/doxygen-awesome-css"]
path = external/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
[submodule "external/oneTBB"]
path = external/oneTBB
url = https://github.com/uxlfoundation/oneTBB.git
23 changes: 23 additions & 0 deletions DiFfRG/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,26 @@ install(
"${CMAKE_CURRENT_BINARY_DIR}/DiFfRGConfigVersion.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/DiFfRGTargets.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/DiFfRG")

# ##############################################################################
# Wrap up
# ##############################################################################

# Add CPMLicenses for disclaimers
CPMAddPackage(
NAME CPMLicenses.cmake
GITHUB_REPOSITORY cpm-cmake/CPMLicenses.cmake
VERSION 0.0.5
)

set(deal.II_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../external/dealii)
set(sundials_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../external/sundials)
set(boost_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../external/boost)

message("deal.II source directory: ${deal.II_SOURCE_DIR}")

message("packages: ${CPM_PACKAGES};deal.II;sundials;boost")

cpm_licenses_create_disclaimer_target(
write-licenses "${CMAKE_CURRENT_SOURCE_DIR}/../third_party.txt" "${CPM_PACKAGES};deal.II;sundials;boost"
)
2 changes: 1 addition & 1 deletion DiFfRG/Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ set(DiFfRG_CMAKE_DIR @CMAKE_INSTALL_PREFIX@/cmake)

set(DiFfRG_USE_CUDA @USE_CUDA@)

include(${CMAKE_CURRENT_LIST_DIR}/DiFfRGTargets.cmake)
include(${DiFfRG_CMAKE_DIR}/setup_build_system.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/DiFfRGTargets.cmake)
7 changes: 4 additions & 3 deletions DiFfRG/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
configure_file(setup_build_system.cmake ${CMAKE_CURRENT_BINARY_DIR}/setup_build_system.cmake COPYONLY)
install(FILES setup_build_system.cmake
DESTINATION "${CMAKE_INSTALL_PREFIX}/cmake")
configure_file(setup_build_system.cmake
${CMAKE_CURRENT_BINARY_DIR}/setup_build_system.cmake COPYONLY)
install(FILES setup_build_system.cmake CPM.cmake
DESTINATION "${CMAKE_INSTALL_PREFIX}/cmake")
Loading

0 comments on commit d7aacdf

Please sign in to comment.