Skip to content

Commit 95ca5d9

Browse files
committed
separate lists and flags for RTERRTMGP files and no-openmp files
1 parent c2abda0 commit 95ca5d9

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ get_filename_component(LOCAL_CURRENT_SOURCE_DIR ${FULL_PATH_TO_CMAKELISTS} DIREC
8181

8282
#------------------------------------------------------------------------------
8383

84-
# List of files that need to be compiled without OpenMP
85-
set(SCHEMES_OPENMP_OFF ${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/gas-optics/mo_gas_optics.F90
84+
# List of files that should be compiled with RTE-RRTMGP compilation flags
85+
set(SCHEMES_RTERRTMGP ${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/gas-optics/mo_gas_optics.F90
8686
${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/gas-optics/mo_gas_optics_constants.F90
8787
${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/gas-optics/mo_gas_concentrations.F90
8888
${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/gas-optics/mo_gas_optics_util_string.F90
@@ -109,6 +109,9 @@ set(SCHEMES_OPENMP_OFF ${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-
109109
${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/rte-frontend/mo_rte_kind.F90
110110
${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/rte-frontend/mo_optical_props.F90)
111111

112+
# List of files that need to be compiled without OpenMP (currently a copy of SCHEMES_RTERRTMGP)
113+
set(SCHEMES_OPENMP_OFF $SCHEMES_RTERRTMGP)
114+
112115
# List of files that need to be compiled with different precision
113116
set(SCHEMES_DYNAMICS)
114117

@@ -124,6 +127,14 @@ if(SCHEMES_DYNAMICS)
124127
list(REMOVE_ITEM SCHEMES ${SCHEMES_DYNAMICS})
125128
endif()
126129

130+
# Remove files that need to be compiled with different flags for RTE-RRTMGP from list
131+
# of files with standard compiler flags, and assign special flags
132+
if(SCHEMES_RTERRTMGP)
133+
SET_PROPERTY(SOURCE ${SCHEMES_RTERRTMGP}
134+
APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_RTERRTMGP}")
135+
list(REMOVE_ITEM SCHEMES ${SCHEMES_RTERRTMGP})
136+
endif()
137+
127138
# Remove files that need to be compiled without OpenMP from list
128139
# of files with standard compiler flags, and assign no-OpenMP flags
129140
if(SCHEMES_OPENMP_OFF)

0 commit comments

Comments
 (0)