-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
47 lines (37 loc) · 1022 Bytes
/
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
# check environment
cmake_minimum_required(VERSION 3.15)
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
set(CMAKE_INSTALL_BINDIR exec)
endif()
if(NOT DEFINED BUILD_POST_STAT)
set(BUILD_POST_STAT on)
endif()
# set the project name and version
project(
AQM-utils
VERSION 1.0.0
LANGUAGES Fortran)
# User options.
option(OPENMP "use OpenMP threading" ON)
# include local macros
list (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# find external libraries
find_package(NetCDF REQUIRED COMPONENTS Fortran)
find_package(g2 REQUIRED)
find_package(w3emc REQUIRED)
find_package(w3nco REQUIRED)
find_package(bacio REQUIRED)
if(OPENMP)
find_package(OpenMP REQUIRED COMPONENTS Fortran)
endif()
if(BUILD_POST_STAT)
find_package(PNG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(bufr REQUIRED)
find_package(Jasper REQUIRED)
endif()
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check all -ftrapuv")
endif()
# add project's subdirectories
add_subdirectory(sorc)