-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
58 lines (42 loc) · 1.43 KB
/
CMakeLists.txt
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
# (C) Copyright 2017 - 2022 UCAR
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# CRTM_coef bundle
#
cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
project( CRTM_coef VERSION 1.0.0 LANGUAGES Fortran )
## Ecbuild integration
find_package( ecbuild QUIET )
include( ecbuild_system NO_POLICY_SCOPE )
ecbuild_declare_project()
list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
set( CMAKE_DIRECTORY_LABELS ${PROJECT_NAME} )
## Configuration options
option( ENABLE_MKL "Use MKL for LAPACK implementation (if available)" OFF )
#include( ${PROJECT_NAME}_compiler_flags )
include(GNUInstallDirs)
## Dependencies
find_package(ecbuild)
set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_CURRENT_SOURCE_DIR}/ecbuild/cmake;${CMAKE_MODULE_PATH}")
include( ecbuild_bundle )
find_package( jedicmake QUIET )
if(OPENMP)
find_package( OpenMP COMPONENTS Fortran )
endif()
find_package( NetCDF REQUIRED COMPONENTS Fortran )
if( ENABLE_MKL )
find_package( MKL )
endif()
if( MKL_FOUND )
set( LAPACK_LIBRARIES ${MKL_LIBRARIES} )
else()
find_package( LAPACK REQUIRED )
endif()
ecbuild_bundle_initialize()
ecbuild_bundle( PROJECT crtm GIT "https://github.com/JCSDA-internal/crtm.git" BRANCH develop UPDATE )
ecbuild_bundle_finalize()
add_subdirectory( src )
#include(cmake/cdash-integration.cmake)
#include(CTest)