2026-03-16 09:50:58 +01:00
|
|
|
find_package(Boost COMPONENTS date_time REQUIRED)
|
|
|
|
|
find_package(dune-common REQUIRED)
|
|
|
|
|
find_package(dune-istl REQUIRED)
|
|
|
|
|
find_package(BLAS REQUIRED)
|
|
|
|
|
find_package(LAPACK REQUIRED)
|
|
|
|
|
find_package(SuiteSparse COMPONENTS UMFPACK REQUIRED)
|
|
|
|
|
find_package(opm-grid REQUIRED)
|
2017-12-19 12:44:24 +01:00
|
|
|
|
2026-03-16 09:50:58 +01:00
|
|
|
if(TARGET opmsimulators)
|
2026-04-29 12:01:12 +02:00
|
|
|
# This branch is executed if find_package(opm-simulators) was called.
|
2026-03-16 09:50:58 +01:00
|
|
|
get_property(opm-simulators_libs TARGET opmsimulators PROPERTY INTERFACE_LINK_LIBRARIES)
|
|
|
|
|
get_property(opm-simulators_def TARGET opmsimulators PROPERTY INTERFACE_COMPILE_DEFINITIONS)
|
|
|
|
|
if(opm-simulators_def MATCHES USE_HIP)
|
|
|
|
|
enable_language(HIP)
|
|
|
|
|
elseif(opm-simulators_def MATCHES HAVE_CUDA)
|
|
|
|
|
include(UseCUDA)
|
|
|
|
|
find_package(CUDAToolkit REQUIRED)
|
|
|
|
|
endif()
|
2026-04-29 10:02:54 +02:00
|
|
|
if(opm-simulators_libs MATCHES ParMETIS::ParMETIS)
|
|
|
|
|
find_package(ParMETIS REQUIRED)
|
|
|
|
|
endif()
|
2026-03-16 09:50:58 +01:00
|
|
|
if(opm-simulators_libs MATCHES OpenCL::OpenCL)
|
|
|
|
|
find_package(OpenCL REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES VexCL::Common)
|
|
|
|
|
find_package(VexCL REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES amgcl::amgcl)
|
|
|
|
|
find_package(amgcl REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES HDF5::HDF5)
|
|
|
|
|
find_package(HDF5 REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES roc::rocsparse)
|
|
|
|
|
find_package(rocsparse REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES roc::rocblas)
|
|
|
|
|
find_package(rocblas REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES roc::rocalution)
|
|
|
|
|
find_package(rocalution REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES roc::hipblas)
|
|
|
|
|
find_package(hipblas REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES roc::hipsparse)
|
|
|
|
|
find_package(hipsparse REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES HYPRE::HYPRE)
|
|
|
|
|
find_package(HYPRE REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES AMGX::AMGX)
|
|
|
|
|
find_package(AMGX REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES damaris)
|
|
|
|
|
find_package(Damaris 1.9 REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES dunealugrid)
|
|
|
|
|
find_package(dune-alugrid REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
if(opm-simulators_libs MATCHES dunefem)
|
|
|
|
|
find_package(dune-fem REQUIRED)
|
|
|
|
|
endif()
|
|
|
|
|
else()
|
2026-04-29 12:01:12 +02:00
|
|
|
# This branch is excuted when cmake is run for opom-simulators
|
2026-03-16 09:50:58 +01:00
|
|
|
find_package(fmt)
|
|
|
|
|
find_package(HDF5)
|
|
|
|
|
find_package(MPI)
|
2026-04-29 10:02:54 +02:00
|
|
|
find_package(ParMETIS)
|
2025-11-26 18:29:14 -06:00
|
|
|
|
2026-03-16 09:50:58 +01:00
|
|
|
# Note: have to look for alugrid before dune-fem.
|
|
|
|
|
# If not dune-fem finds alugrid, but does not use
|
|
|
|
|
# the opm find-module which means the HAVE_DUNE_ALUGRID
|
|
|
|
|
# define will be missing.
|
|
|
|
|
find_package(dune-alugrid)
|
|
|
|
|
find_package(dune-fem)
|
|
|
|
|
endif()
|