-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathmpas-jedi-import.cmake.in
More file actions
59 lines (48 loc) · 1.81 KB
/
mpas-jedi-import.cmake.in
File metadata and controls
59 lines (48 loc) · 1.81 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
# mpas-jedi-import.cmake
include(CMakeFindDependencyMacro)
if(NOT (OpenMP_CXX_FOUND AND OpenMP_Fortran_FOUND))
find_dependency( OpenMP REQUIRED COMPONENTS CXX Fortran )
endif()
if(@rttov_FOUND@ AND NOT rttov_FOUND)
find_dependency(rttov REQUIRED)
endif()
if(@ropp_FOUND@ AND NOT ropp-ufo_FOUND)
find_dependency(ropp-ufo REQUIRED)
endif()
if(NOT (MPI_CXX_FOUND AND MPI_FORTRAN_FOUND))
find_dependency( MPI REQUIRED COMPONENTS CXX Fortran )
endif()
if(NOT Boost_FOUND)
find_dependency( Boost REQUIRED )
endif()
if(NOT mpas_FOUND)
find_dependency( mpas REQUIRED COMPONENTS DOUBLE_PRECISION core_atmosphere)
endif()
if(NOT atlas_FOUND)
if(@OpenMP_FOUND@) # OpenMP_FOUND
find_dependency( atlas REQUIRED COMPONENTS OMP OMP_Fortran )
else()
find_dependency( atlas REQUIRED )
endif()
endif()
if(NOT oops_FOUND)
find_dependency(oops REQUIRED)
endif()
if(NOT saber_FOUND)
find_dependency(saber REQUIRED)
endif()
if(NOT ioda_FOUND)
find_dependency(ioda REQUIRED)
endif()
if(NOT ufo_FOUND)
find_dependency(ufo REQUIRED)
endif()
#Export Fortran compiler version for checking module compatibility
set(@PROJECT_NAME@_MODULES_Fortran_COMPILER_ID @CMAKE_Fortran_COMPILER_ID@)
set(@PROJECT_NAME@_MODULES_Fortran_COMPILER_VERSION @CMAKE_Fortran_COMPILER_VERSION@)
if(NOT @PROJECT_NAME@_MODULES_Fortran_COMPILER_ID STREQUAL CMAKE_Fortran_COMPILER_ID
OR NOT @PROJECT_NAME@_MODULES_Fortran_COMPILER_VERSION VERSION_EQUAL CMAKE_Fortran_COMPILER_VERSION)
message(SEND_ERROR "Package mpasjedi provides Fortran modules built with "
"${@PROJECT_NAME@_MODULES_Fortran_COMPILER_ID}-${@PROJECT_NAME@_MODULES_Fortran_COMPILER_VERSION} "
"but this build for ${PROJECT_NAME} uses incompatible compiler ${CMAKE_Fortran_COMPILER_ID}-${CMAKE_Fortran_COMPILER_VERSION}")
endif()