Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / confcheck / CMakeLists.txt
blobaab2e3bc693abbac26c4656e4f02d12e021abb4c
1 # WRF configuration checks
2 wrf_conf_check(
3                 RUN
4                 RESULT_VAR Fortran_2003_IEEE
5                 SOURCE     ${PROJECT_SOURCE_DIR}/tools/fortran_2003_ieee_test.F
6                 EXTENSION  .F
7                 MESSAGE    "Some IEEE Fortran 2003 features missing, removing usage of these features"
8                 )
10 wrf_conf_check(
11                 RUN
12                 RESULT_VAR Fortran_2003_ISO_C
13                 SOURCE     ${PROJECT_SOURCE_DIR}/tools/fortran_2003_iso_c_test.F
14                 EXTENSION  .F
15                 MESSAGE    "Some ISO_C Fortran 2003 features missing, removing usage ISO_C and stubbing code dependent on it"
16                 )
18 wrf_conf_check(
19                 RUN
20                 RESULT_VAR Fortran_2003_FLUSH
21                 SOURCE     ${PROJECT_SOURCE_DIR}/tools/fortran_2003_flush_test.F
22                 EXTENSION  .F
23                 MESSAGE    "Standard FLUSH routine Fortran 2003 features missing, checking for alternate Fortran_2003_FFLUSH"
24                 )
26 if ( NOT ${Fortran_2003_FLUSH} )
27   wrf_conf_check(
28                   RUN
29                   RESULT_VAR Fortran_2003_FFLUSH
30                   SOURCE     ${PROJECT_SOURCE_DIR}/tools/fortran_2003_fflush_test.F
31                   EXTENSION  .F
32                   MESSAGE    "Standard FFLUSH routine Fortran 2003 features missing, no alternate to FLUSH found, feature stubbed out"
33                   )
34 endif()
36 wrf_conf_check(
37                 RUN
38                 RESULT_VAR Fortran_2003_GAMMA
39                 SOURCE     ${PROJECT_SOURCE_DIR}/tools/fortran_2008_gamma_test.F
40                 EXTENSION  .F
41                 MESSAGE    "Some Fortran 2003 features missing, removing usage gamma function intrinsic and stubbing code dependent on it"
42                 )
46 wrf_conf_check(
47                 RUN
48                 SOURCE_TYPE            C
49                 RESULT_VAR             FSEEKO64
50                 SOURCE                 ${PROJECT_SOURCE_DIR}/tools/fseek_test.c
51                 EXTENSION              .c
52                 ADDITIONAL_DEFINITIONS -DTEST_FSEEKO64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -DFILE_TO_TEST="${PROJECT_SOURCE_DIR}/CMakeLists.txt"
53                 MESSAGE                "fseeko64 not supported, checking alternate fseeko"
54                 )
56 if ( NOT "${FSEEKO64}" )
57   wrf_conf_check(
58                   RUN
59                   SOURCE_TYPE            C
60                   RESULT_VAR             FSEEKO
61                   SOURCE                 ${PROJECT_SOURCE_DIR}/tools/fseek_test.c
62                   EXTENSION              .c
63                   ADDITIONAL_DEFINITIONS -DTEST_FSEEKO -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -DFILE_TO_TEST="${PROJECT_SOURCE_DIR}/CMakeLists.txt"
64                   MESSAGE                "fseeko not supported, compiling with fseek (caution with large files)"
65                   )
66 endif()
68 # Unsure if this is even necessary. Defines littered throughout configure.defaults
69 # if ( ${USE_MPI} )
70 #   wrf_conf_check(
71 #                   RUN
72 #                   SOURCE_TYPE           C
73 #                   RESULT_VAR            MPI2_SUPPORT
74 #                   SOURCE                ${PROJECT_SOURCE_DIR}/tools/mpi2_test.c
75 #                   EXTENSION             .c
76 #                   MESSAGE               "MPI_Comm_f2c() and MPI_Comm_c2f() not supported"
77 #                   )
79 #   wrf_conf_check(
80 #                   RUN
81 #                   SOURCE_TYPE           C
82 #                   RESULT_VAR            MPI2_THREAD_SUPPORT
83 #                   SOURCE                ${PROJECT_SOURCE_DIR}/tools/mpi2_thread_test.c
84 #                   EXTENSION             .c
85 #                   MESSAGE               "MPI_Init_thread() not supported"
86 #                   )
87 # endif()