-
Notifications
You must be signed in to change notification settings - Fork 166
/
CMakeLists.txt
68 lines (61 loc) · 2.58 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
59
60
61
62
63
64
65
66
67
68
# GEOS-Chem repository CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
#-----------------------------------------------------------------------------
# Set policies
#-----------------------------------------------------------------------------
cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0057 NEW)
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
if(POLICY CMP0079)
cmake_policy(SET CMP0079 NEW)
endif()
# Add GEOS-Chem CMake helpers to MODULE_PATH
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/CMakeScripts)
include(GC-Helpers)
#-----------------------------------------------------------------------------
# Print header
#-----------------------------------------------------------------------------
get_repo_version(GC_REPO_VERSION ${CMAKE_CURRENT_SOURCE_DIR})
message("=================================================================")
message("GEOS-Chem ${PROJECT_VERSION} (science codebase)")
message("Current status: ${GC_REPO_VERSION}")
message("=================================================================")
#-----------------------------------------------------------------------------
# Declare the GEOSChemBuildProperties library
#
# All GEOS-Chem targets depend on this. This is used to control the compiler
# options and definitions for GEOS-Chem targets (via inheritance).
#
# Optionally, super project can define and configure this target.
#-----------------------------------------------------------------------------
if(NOT TARGET GEOSChemBuildProperties)
add_library(GEOSChemBuildProperties INTERFACE)
endif()
#-----------------------------------------------------------------------------
# Add all the subdirectories.
# Each subdirectory specifies how it should be built.
#-----------------------------------------------------------------------------
add_subdirectory(KPP)
add_subdirectory(Headers)
add_subdirectory(GeosUtil)
add_subdirectory(NcdfUtil)
add_subdirectory(History)
add_subdirectory(ObsPack)
add_subdirectory(APM)
add_subdirectory(GeosRad)
add_subdirectory(GTMM)
add_subdirectory(GeosCore)
#-----------------------------------------------------------------------------
# Build GEOS-Chem Classic driver program (if MODEL_CLASSIC=T)
#-----------------------------------------------------------------------------
if(MODEL_CLASSIC)
add_subdirectory(Interfaces/GCClassic)
endif()
#-----------------------------------------------------------------------------
# Build GCHPctm driver program (if MODEL_GCHPCTM=T)
#-----------------------------------------------------------------------------
if(MODEL_GCHPCTM)
add_subdirectory(Interfaces/GCHP)
endif()