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

Fix configuration export #290

Merged
merged 5 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- [[PR269]](https://github.com/lanl/singularity-eos/pull/269) Add SAP Polynomial EoS

### Fixed (Repair bugs, etc)
- [[PR290]](https://github.com/lanl/singularity-eos/pull/290) Added target guards on export config
- [[PR288]](https://github.com/lanl/singularity-eos/pull/288) Don't build tests that depend on spiner when spiner is disabled
- [[PR287]](https://github.com/lanl/singularity-eos/pull/287) Fix testing logic with new HDF5 options
- [[PR282]](https://github.com/lanl/singularity-eos/pull/282) Fix missing deep copy in sap polynomial tests
Expand Down
4 changes: 3 additions & 1 deletion cmake/singularity-eos/hdf5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ macro(singularity_enable_hdf5 target)
COMPONENTS C CXX
REQUIRED)
target_link_libraries(${target} PUBLIC MPI::MPI_CXX)
set(SINGLUARITY_USE_SPINER_WITH_PARALLEL_HDF5 TRUE)
set(SINGULARITY_USE_SPINER_WITH_PARALLEL_HDF5
ON
CACHE BOOL "" FORCE)
endif()

target_compile_definitions(${target} PUBLIC SINGULARITY_USE_HDF5)
Expand Down
54 changes: 30 additions & 24 deletions config/singularity-eosConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,44 @@ endif()
# ------------------------------------------------------------------------------#
# library dependencies
# ------------------------------------------------------------------------------#
find_package(ports-of-call REQUIRED)
find_package(mpark_variant REQUIRED)

include(CMakeFindDependencyMacro)

find_dependency(ports-of-call)

find_dependency(mpark_variant)

if(@SINGULARITY_USE_SPINER@)
find_package(spiner REQUIRED)
if(@SINGULARITY_USE_SPINER_WITH_HDF5@)
find_package(
HDF5
COMPONENTS C HL
REQUIRED)
if(@SINGULARITY_USE_SPINER_WITH_PARALLEL_HDF5@)
# do i need enable_language here?
find_package(
MPI
COMPONENTS C CXX
REQUIRED)
endif()
set(SPINER_USE_HDF ON)
endif()
find_dependency(spiner)
endif()

if(@SINGULARITY_USE_SPINER_WITH_HDF5@)
find_dependency(HDF5 COMPONENTS C HL)
set(SPINER_USE_HDF ON)
endif()

if(@SINGULARITY_USE_SPINER_WITH_PARALLEL_HDF5@)
# do i need enable_language here?
find_dependency(MPI COMPONENTS C CXX)
endif()

if(@SINGULARITY_USE_KOKKOS@)
find_package(Kokkos REQUIRED)
if(@SINGULARITY_USE_KOKKOSKERNELS@)
find_package(KokkosKernels REQUIRED)
endif()
else()
find_package(Eigen3 REQUIRED)
find_dependency(Kokkos)
endif()

if(@SINGULARITY_USE_KOKKOSKERNELS@)
find_dependency(KokkosKernels)
endif()

if(@SINGULARITY_USE_EIGEN@)
find_dependency(Eigen3)
endif()

if(@SINGULARITY_USE_EOSPAC@)
find_package(EOSPAC REQUIRED)
# needed for EOSPAC
if(NOT TARGET EOSPAC::eospac)
find_dependency(EOSPAC)
endif()
endif()

# ------------------------------------------------------------------------------#
Expand Down