-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathopm-grid-prereqs.cmake
More file actions
33 lines (32 loc) · 1020 Bytes
/
opm-grid-prereqs.cmake
File metadata and controls
33 lines (32 loc) · 1020 Bytes
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
# These packages are always required
find_package(dune-common REQUIRED)
find_package(dune-geometry REQUIRED)
find_package(dune-grid REQUIRED)
# If the target is created, it means we are used from the config file.
# Use compile definitions to decide which packages are required.
if(TARGET opmgrid)
get_property(opm-grid_LIBS TARGET opmgrid PROPERTY INTERFACE_LINK_LIBRARIES)
if(opm-grid_LIBS MATCHES MPI::MPI)
find_package(MPI REQUIRED)
endif()
if(opm-grid_LIBS MATCHES duneistl)
find_package(dune-istl REQUIRED)
endif()
if(opm-grid_LIBS MATCHES Zoltan::Zoltan)
find_package(ZOLTAN REQUIRED)
endif()
if(opm-grid_LIBS MATCHES METIS::METIS)
find_package(METIS REQUIRED)
endif()
if(opm-grid_LIBS MATCHES duneuggrid)
find_package(dune-uggrid REQUIRED)
endif()
else()
# Used in the opm-grid build system. These are optional
# so no required flag here.
find_package(dune-uggrid)
find_package(MPI)
find_package(dune-istl)
find_package(ZOLTAN)
find_package(METIS)
endif()