forked from NOAA-PSL/stochastic_physics
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
73 lines (65 loc) · 2.12 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
69
70
71
72
73
if(32BIT)
message ("Force 64 bits in stochastic_physics")
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8")
endif()
endif()
list(APPEND _stoch_phys_srcs
kinddef.F90
mpi_wrapper.F90
halo_exchange.fv3.F90
plumes.f90
four_to_grid_stochy.F
fftpack_stochy.f
glats_stochy.f
sumfln_stochy.f
gozrineo_stochy.f
num_parthds_stochy.f
get_ls_node_stochy.f
get_lats_node_a_stochy.f
setlats_a_stochy.f
setlats_lag_stochy.f
epslon_stochy.f
getcon_lag_stochy.f
pln2eo_stochy.f
dozeuv_stochy.f
dezouv_stochy.f
mersenne_twister.F
spectral_layout.F90
getcon_spectral.F90
stochy_namelist_def.F90
compns_stochy.F90
stochy_internal_state_mod.F90
stochastic_physics.F90
stochy_patterngenerator.F90
stochy_data_mod.F90
get_stochy_pattern.F90
initialize_spectral_mod.F90
cellular_automata_global.F90
cellular_automata_sgs.F90
update_ca.F90
lndp_apply_perts.F90
)
add_library(stochastic_physics ${_stoch_phys_srcs})
add_dependencies(stochastic_physics fms)
target_compile_definitions(stochastic_physics PRIVATE INTERNAL_FILE_NML)
set_target_properties(stochastic_physics PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(stochastic_physics INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)
target_link_libraries(stochastic_physics PUBLIC fms)
if(OPENMP)
target_link_libraries(stochastic_physics PRIVATE OpenMP::OpenMP_Fortran)
endif()
###############################################################################
### Install
###############################################################################
install(
TARGETS stochastic_physics
EXPORT stochastic_physics-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX})
install(EXPORT stochastic_physics-config
DESTINATION lib/cmake)