forked from ecmwf/multio
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
93 lines (61 loc) · 2.7 KB
/
CMakeLists.txt
File metadata and controls
93 lines (61 loc) · 2.7 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# (C) Copyright 2011- ECMWF.
#
# 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.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.
########################################################################################################################
cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
find_package( ecbuild 3.6 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
project( multio LANGUAGES CXX )
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
### dependencies
ecbuild_find_package( NAME eccodes VERSION 2.18 REQUIRED )
ecbuild_find_package( NAME eckit VERSION 1.16 REQUIRED )
ecbuild_find_package( NAME metkit VERSION 1.7 REQUIRED )
if( NOT metkit_HAVE_GRIB )
ecbuild_critical( "metkit must be built with GRIB support" )
endif()
### fdb5 plugin
ecbuild_add_option( FEATURE FDB5
DEFAULT ON
DESCRIPTION "Send data to FDB5"
REQUIRED_PACKAGES "NAME fdb5 VERSION 5.10.1" )
### legacy IFS I/O
ecbuild_add_option( FEATURE LEGACY_IFSIO
DEFAULT OFF
DESCRIPTION "Legacy (FDB4) IFS I/O interface" )
### multio-server
ecbuild_add_option( FEATURE MULTIO_SERVER
DEFAULT OFF
CONDITION eckit_HAVE_MPI
DESCRIPTION "Multio server" )
### multio fortran bindings
ecbuild_add_option( FEATURE FORTRAN
DESCRIPTION "Provide Fortran bindings")
### Maestro plugin
ecbuild_add_option( FEATURE MAESTRO
DEFAULT OFF
DESCRIPTION "Pass data to Maestro middleware"
REQUIRED_PACKAGES "NAME Maestro" "NAME pgen" )
### sandbox
ecbuild_add_option( FEATURE SANDBOX
DEFAULT OFF
DESCRIPTION "Sanbox for exploring io server design" )
### export package info
set( MULTIO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src )
set( MULTIO_LIBRARIES multio )
get_directory_property( MULTIO_DEFINITIONS COMPILE_DEFINITIONS )
### sources
include(cmake/compiler_warnings.cmake) # optionally handle compiler specific warnings
include_directories( ${MULTIO_INCLUDE_DIRS} )
add_subdirectory( src )
add_subdirectory( tests )
### finalize project
ecbuild_pkgconfig(NAME multio
DESCRIPTION "ECMWF Multiplexing IO library"
LIBRARIES multio )
ecbuild_install_project( NAME ${PROJECT_NAME} )
ecbuild_print_summary()