Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: add feature summary #789

Merged
merged 5 commits into from
Oct 9, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 parallelization")

# 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 )

streeve marked this conversation as resolved.
Show resolved Hide resolved
# 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")
junghans marked this conversation as resolved.
Show resolved Hide resolved

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)
Loading