3 get_filename_component( FOLDER_COMPILE_TARGET ${CMAKE_CURRENT_SOURCE_DIR} NAME)
6 module_internal_header_util.F
7 ${CMAKE_BINARY_DIR}/frame/module_state_description.F
11 ########################################################################################################################
12 # Extra stuff for things that depend on registry code
13 # https://stackoverflow.com/a/50640971
14 # Generate all the combinations dynamically, not a fan of this file breakdown
15 ########################################################################################################################
17 foreach( n RANGE 0 7 )
19 wrf_c_preproc_fortran(
20 TARGET_NAME nl_set_${n}
21 OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/preproc/
24 INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
25 ${CMAKE_BINARY_DIR}/inc
26 DEPENDENCIES registry_code
27 DEFINITIONS ${PROJECT_COMPILE_DEFINITIONS} NNN=${n} NL_set_ROUTINES
28 SOURCES nl_access_routines.F
30 wrf_c_preproc_fortran(
31 TARGET_NAME nl_get_${n}
32 OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/preproc/
35 INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
36 ${CMAKE_BINARY_DIR}/inc
37 DEPENDENCIES registry_code
38 DEFINITIONS ${PROJECT_COMPILE_DEFINITIONS} NNN=${n} NL_get_ROUTINES
39 SOURCES nl_access_routines.F
42 add_dependencies( ${PROJECT_NAME}_Core nl_get_${n} nl_set_${n} )
47 ${CMAKE_CURRENT_BINARY_DIR}/preproc/nl_set_${n}_nl_access_routines.f90
48 ${CMAKE_CURRENT_BINARY_DIR}/preproc/nl_get_${n}_nl_access_routines.f90
54 wrf_m4_preproc_fortran(
56 OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/preproc/
59 TARGET_SCOPE ${PROJECT_NAME}_Core
64 # Copy from arch quickly
65 # Normally I would say we just add it as source but it is an include file and I don't want to potentially
66 # pollute the include chain by adding in arch/ *and* I want to maintain the order of operations
67 # for target dependencies
68 wrf_copy_source_files(
70 OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/preproc/
71 SOURCES ${PROJECT_SOURCE_DIR}/arch/md_calls.inc
75 add_dependencies( ${PROJECT_NAME}_Core md_calls )
76 target_include_directories(
79 ${CMAKE_CURRENT_BINARY_DIR}/preproc/
81 ########################################################################################################################
83 # Now define base framework
85 ########################################################################################################################
86 set( MODULE_DM module_dm_stubs.F )
87 if ( ${USE_RSL_LITE} )
88 message( STATUS "Setting module_dm to RSL_LITE" )
91 ${PROJECT_SOURCE_DIR}/external/RSL_LITE/module_dm.F
92 ${PROJECT_SOURCE_DIR}/external/RSL_LITE/feedback_domain_em_part1.F
93 ${PROJECT_SOURCE_DIR}/external/RSL_LITE/feedback_domain_em_part2.F
94 ${PROJECT_SOURCE_DIR}/external/RSL_LITE/force_domain_em_part2.F
95 ${PROJECT_SOURCE_DIR}/external/RSL_LITE/interp_domain_em_part1.F
96 ${PROJECT_SOURCE_DIR}/external/RSL_LITE/interp_domain_em_part2.F
97 ${PROJECT_SOURCE_DIR}/external/RSL_LITE/interp_domain_em_part3.F
98 ${PROJECT_SOURCE_DIR}/external/RSL_LITE/interp_domain_em_small.F
108 module_driver_constants.F
121 ${nl_dyn_source} # GENERATED
135 module_comm_nesting_dm.F
145 module_quilt_outbuf_ops.F
151 wrf_num_bytes_between.c
155 # Disable optimizations on these files always
156 set_source_files_properties(
159 COMPILE_OPTIONS_OPTIMIZATION
160 $<$<COMPILE_LANGUAGE:Fortran>:${WRF_FCNOOPT}>
164 FILES ${WRF_INCLUDE_FILES}
165 DESTINATION include/${FOLDER_COMPILE_TARGET}