Skip to content

Commit

Permalink
cmake: add feature summary
Browse files Browse the repository at this point in the history
  • Loading branch information
junghans committed Oct 7, 2024
1 parent 15820c2 commit e11935f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
include(GNUInstallDirs)
set(Cabana_INSTALL_PACKAGEDIR "${CMAKE_INSTALL_DATADIR}/cmake/Cabana" CACHE PATH "Install location of CMake target files")

include(FeatureSummary)

# point to cmake modules
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

Expand Down Expand Up @@ -77,12 +79,15 @@ if(Cabana_REQUIRE_HDF5)
else()
Cabana_add_dependency( PACKAGE MPI COMPONENTS CXX )
endif()
set_package_properties(MPI PROPERTIES TYPE RECOMMENDED PURPOSE "Used for parallization")

# find ArborX
Cabana_add_dependency( PACKAGE ArborX )
set_package_properties(ArborX PROPERTIES TYPE OPTIONAL PURPOSE "Used in neighbor search")

# find ALL
Cabana_add_dependency( PACKAGE ALL )
set_package_properties(ALL PROPERTIES TYPE OPTIONAL PURPOSE "Used for load balancing")

# find Clang Format
find_package( CLANG_FORMAT 14 )
Expand All @@ -92,9 +97,11 @@ Cabana_add_dependency( PACKAGE HYPRE VERSION 2.22.1 )

# find heffte
Cabana_add_dependency( PACKAGE Heffte VERSION 2.3.0 )
set_package_properties(Heffte PROPERTIES TYPE OPTIONAL PURPOSE "Used for fft calculations")

# find Silo
Cabana_add_dependency( PACKAGE SILO )
set_package_properties(SILO PROPERTIES TYPE OPTIONAL PURPOSE "Used for I/O")
if(SILO_FOUND)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindSILO.cmake
Expand All @@ -118,6 +125,7 @@ if(CMAKE_VERSION VERSION_LESS 3.26)
else()
Cabana_add_dependency( PACKAGE HDF5 COMPONENTS C )
endif()
set_package_properties(HDF5 PROPERTIES TYPE RECOMMENDED PURPOSE "Used for I/O")

if(Cabana_ENABLE_HDF5)
if(NOT Cabana_ENABLE_MPI)
Expand Down Expand Up @@ -237,6 +245,7 @@ endif()
add_subdirectory(core)

option(Cabana_ENABLE_GRID "Build grid and particle-grid capabilities" ${Cabana_ENABLE_MPI})
add_feature_info(Cabana_ENABLE_GRID Cabana_ENABLE_GRID "Build grid and particle-grid capabilities (needs MPI)")
if(Cabana_ENABLE_GRID)
if(MPI_FOUND)
add_subdirectory(grid)
Expand Down Expand Up @@ -277,3 +286,5 @@ if(CLANG_FORMAT_FOUND)
COMMAND ${CLANG_FORMAT_EXECUTABLE} -i -style=file ${FORMAT_SOURCES}
DEPENDS ${FORMAT_SOURCES})
endif()

feature_summary(INCLUDE_QUIET_PACKAGES WHAT ALL)

0 comments on commit e11935f

Please sign in to comment.