forked from wrf-model/WRF
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
80 lines (70 loc) · 3.38 KB
/
CMakeLists.txt
File metadata and controls
80 lines (70 loc) · 3.38 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
# WRF configuration checks
wrf_conf_check(
RUN
RESULT_VAR Fortran_2003_IEEE
SOURCES ${PROJECT_SOURCE_DIR}/tools/fortran_2003_ieee_test.F
MESSAGE "Some IEEE Fortran 2003 features missing, removing usage of these features"
)
wrf_conf_check(
RUN
RESULT_VAR Fortran_2003_ISO_C
SOURCES ${PROJECT_SOURCE_DIR}/tools/fortran_2003_iso_c_test.F
MESSAGE "Some ISO_C Fortran 2003 features missing, removing usage ISO_C and stubbing code dependent on it"
)
wrf_conf_check(
RUN
RESULT_VAR Fortran_2003_FLUSH
SOURCES ${PROJECT_SOURCE_DIR}/tools/fortran_2003_flush_test.F
MESSAGE "Standard FLUSH routine Fortran 2003 features missing, checking for alternate Fortran_2003_FFLUSH"
)
if ( NOT ${Fortran_2003_FLUSH} )
wrf_conf_check(
RUN
RESULT_VAR Fortran_2003_FFLUSH
SOURCES ${PROJECT_SOURCE_DIR}/tools/fortran_2003_fflush_test.F
MESSAGE "Standard FFLUSH routine Fortran 2003 features missing, no alternate to FLUSH found, feature stubbed out"
)
endif()
wrf_conf_check(
RUN
RESULT_VAR Fortran_2003_GAMMA
SOURCES ${PROJECT_SOURCE_DIR}/tools/fortran_2008_gamma_test.F
MESSAGE "Some Fortran 2003 features missing, removing usage gamma function intrinsic and stubbing code dependent on it"
)
wrf_conf_check(
RUN
RESULT_VAR FSEEKO64
SOURCES ${PROJECT_SOURCE_DIR}/tools/fseek_test.c
OPTIONS
COMPILE_DEFINITIONS -DTEST_FSEEKO64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -DFILE_TO_TEST="${PROJECT_SOURCE_DIR}/CMakeLists.txt"
MESSAGE "fseeko64 not supported, checking alternate fseeko"
)
if ( NOT "${FSEEKO64}" )
wrf_conf_check(
RUN
RESULT_VAR FSEEKO
SOURCES ${PROJECT_SOURCE_DIR}/tools/fseek_test.c
OPTIONS
COMPILE_DEFINITINOS -DTEST_FSEEKO -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -DFILE_TO_TEST="${PROJECT_SOURCE_DIR}/CMakeLists.txt"
MESSAGE "fseeko not supported, compiling with fseek (caution with large files)"
)
endif()
# Unsure if this is even necessary. Defines littered throughout configure.defaults
# if ( ${USE_MPI} )
# wrf_conf_check(
# RUN
# SOURCE_TYPE C
# RESULT_VAR MPI2_SUPPORT
# SOURCE ${PROJECT_SOURCE_DIR}/tools/mpi2_test.c
# EXTENSION .c
# MESSAGE "MPI_Comm_f2c() and MPI_Comm_c2f() not supported"
# )
# wrf_conf_check(
# RUN
# SOURCE_TYPE C
# RESULT_VAR MPI2_THREAD_SUPPORT
# SOURCE ${PROJECT_SOURCE_DIR}/tools/mpi2_thread_test.c
# EXTENSION .c
# MESSAGE "MPI_Init_thread() not supported"
# )
# endif()