Skip to content

Commit a2fa199

Browse files
committed
Add ability to build with ip if it is found. sp is being replaced by ip so this is needed. Note that in spack-stack 1.9.3 the ip package builds with the OpenMP flag, so CMAKE_Fortran_FLAGS_OPENMP_OFF needs to be set by the host model. The RRTMGP files currently break if compiled with OpenMP flags.
1 parent 85f3134 commit a2fa199

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,13 @@ target_include_directories(ccpp_physics PUBLIC
207207

208208
target_link_libraries(ccpp_physics PRIVATE MPI::MPI_Fortran)
209209
target_link_libraries(ccpp_physics PUBLIC w3emc::w3emc_d
210-
sp::sp_d
211210
NetCDF::NetCDF_Fortran
212211
)
212+
if(ip_FOUND)
213+
target_link_libraries(ccpp_physics PUBLIC ip::ip_d)
214+
else()
215+
target_link_libraries(ccpp_physics PUBLIC sp::sp_d)
216+
endif()
213217
#add FMS for FV3 only
214218
if(FV3 OR MPAS)
215219
target_link_libraries(ccpp_physics PUBLIC fms)

0 commit comments

Comments
 (0)