-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathopm-simulators-prereqs.cmake
More file actions
71 lines (69 loc) · 2.21 KB
/
opm-simulators-prereqs.cmake
File metadata and controls
71 lines (69 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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)
if(TARGET opmsimulators)
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()
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()
find_package(fmt)
find_package(HDF5)
find_package(MPI)
# 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()