forked from NOAA-EMC/GDASApp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (40 loc) · 1.64 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
# ------------------------------------------------------------------------- #
# Application for the GDAS system #
# ------------------------------------------------------------------------- #
# Check for minimim cmake requirement
cmake_minimum_required( VERSION 3.20 FATAL_ERROR )
find_package(ecbuild 3.5 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
project(GDASApp VERSION 1.0.0 LANGUAGES C CXX Fortran )
# include_directories(${CMAKE_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include(GNUInstallDirs)
enable_testing()
# Build type.
if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE
"Release"
CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()
# Find dependencies.
find_package(Python3 REQUIRED COMPONENTS Interpreter)
# Include ecbuild_bundle macro
include( ecbuild_bundle )
# Enable MPI
set( ENABLE_MPI ON CACHE BOOL "Compile with MPI" )
# Handle user options.
option(BUILD_GDASBUNDLE "Build GDAS Bundle" ON)
option(CLONE_JCSDADATA "Clone JCSDA test data repositories" OFF)
option(WORKFLOW_TESTS "Include global-workflow dependent tests" OFF)
# Build GDAS-managed JEDI executables
if( BUILD_GDASBUNDLE )
find_package( fv3jedi REQUIRED )
find_package( soca REQUIRED )
add_subdirectory( mains )
endif()
# Install utility scripts.
add_subdirectory(ush)
# Include testing.
add_subdirectory(test)