-
Notifications
You must be signed in to change notification settings - Fork 6
/
crtm-config.cmake.in
23 lines (18 loc) · 1.09 KB
/
crtm-config.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# crtm-config.cmake.in
include(CMakeFindDependencyMacro)
# Include dependencies here, e.g.,
find_dependency(NetCDF REQUIRED Fortran)
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/crtm-targets.cmake)
set(crtm_IMPORT_FILE "${CMAKE_CURRENT_LIST_DIR}/crtm-targets.cmake")
include(${crtm_IMPORT_FILE})
endif()
set(crtm_VERSION "@PROJECT_VERSION@")
#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 @PROJECT_NAME@ 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()