Skip to content

Commit

Permalink
CMakeLists.txt update for macosx.gnu platform
Browse files Browse the repository at this point in the history
no changes from develop branch for the build.sh script
  • Loading branch information
Natalie Perlin committed Jan 7, 2025
1 parent 58a5993 commit fa6dccc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,12 @@ target_link_libraries(ufs PUBLIC "${_ufs_libs_public}")
add_executable(ufs_model driver/UFS.F90)
add_dependencies(ufs_model ufs)
target_link_libraries(ufs_model ufs esmf w3emc::w3emc_d)
set_target_properties(ufs_model PROPERTIES LINKER_LANGUAGE Fortran)

if(CMAKE_Platform MATCHES "macosx.gnu")
set_target_properties(ufs_model PROPERTIES LINKER_LANGUAGE CXX)
else()
set_target_properties(ufs_model PROPERTIES LINKER_LANGUAGE Fortran)
endif()

###############################################################################
### Install
Expand Down
4 changes: 0 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ export FC=${FC:-mpif90}
BUILD_DIR=${BUILD_DIR:-${UFS_MODEL_DIR}/build}
mkdir -p "${BUILD_DIR}"

if [[ "$(uname -s)" == "Darwin" ]]; then
gsed -i'.backup' "s:LINKER_LANGUAGE Fortran:LINKER_LANGUAGE CXX:" ./CMakeLists.txt
fi

cd "${BUILD_DIR}"
ARR_CMAKE_FLAGS=()
for i in ${CMAKE_FLAGS}; do ARR_CMAKE_FLAGS+=("${i}") ; done
Expand Down

0 comments on commit fa6dccc

Please sign in to comment.