Skip to content

Commit

Permalink
Add cdeps paths to CICE-interface/CMakeLists.txt following cdeps in C…
Browse files Browse the repository at this point in the history
…MEPS-interface/CMakeLists.txt
  • Loading branch information
NickSzapiro-NOAA authored Apr 17, 2024
1 parent aff77d1 commit 5b4bff3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions CICE-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -fbacktrace")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fconvert=big-endian -ffree-line-length-none ")
#Set CPP defintions for the ufs/cdeps_share source component of the cmeps target library
list(APPEND CDEPS_SHARE_DEFS "CPRGNU")
if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
endif()
Expand All @@ -14,6 +16,8 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fp-model precise")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created -init=snan,arrays")
set(CMAKE_Fortran_LINK_FLAGS "")
#Set CPP defintions for the ufs/cdeps_share source component of the cmeps target library
list(APPEND CDEPS_SHARE_DEFS "CPRINTEL")
else()
message(WARNING "Fortran compiler with ID ${CMAKE_Fortran_COMPILER_ID} will be used with CMake default options")
endif()
Expand Down Expand Up @@ -53,6 +57,22 @@ list(APPEND lib_src_files
${cice_mpi_comm_files}
${cice_nuopc_cmeps_driver_files})

if (WAVICE)
list(APPEND lib_src_files
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_orb_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_const_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_abort_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_strconvert_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_log_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_sys_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_kind_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/ufs/cdeps_share/shr_assert_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/ufs/cdeps_share/shr_infnan_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_nl_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/dshr/dshr_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/streams/dshr_methods_mod.F90))
endif()

list(APPEND _cice_defs FORTRANUNDERSCORE
coupled)

Expand Down Expand Up @@ -84,6 +104,11 @@ if(OpenMP_Fortran_FOUND)
target_link_libraries(cice PRIVATE OpenMP::OpenMP_Fortran)
endif()

if(WAVICE)
add_dependencies(cice cdeps::cdeps)
target_link_libraries(cice PUBLIC cdeps::cdeps)
endif()

###############################################################################
### Install
###############################################################################
Expand Down

0 comments on commit 5b4bff3

Please sign in to comment.