Skip to content

Commit fa6dccc

Browse files
author
Natalie Perlin
committed
CMakeLists.txt update for macosx.gnu platform
no changes from develop branch for the build.sh script
1 parent 58a5993 commit fa6dccc

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,12 @@ target_link_libraries(ufs PUBLIC "${_ufs_libs_public}")
377377
add_executable(ufs_model driver/UFS.F90)
378378
add_dependencies(ufs_model ufs)
379379
target_link_libraries(ufs_model ufs esmf w3emc::w3emc_d)
380-
set_target_properties(ufs_model PROPERTIES LINKER_LANGUAGE Fortran)
380+
381+
if(CMAKE_Platform MATCHES "macosx.gnu")
382+
set_target_properties(ufs_model PROPERTIES LINKER_LANGUAGE CXX)
383+
else()
384+
set_target_properties(ufs_model PROPERTIES LINKER_LANGUAGE Fortran)
385+
endif()
381386

382387
###############################################################################
383388
### Install

build.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ export FC=${FC:-mpif90}
1313
BUILD_DIR=${BUILD_DIR:-${UFS_MODEL_DIR}/build}
1414
mkdir -p "${BUILD_DIR}"
1515

16-
if [[ "$(uname -s)" == "Darwin" ]]; then
17-
gsed -i'.backup' "s:LINKER_LANGUAGE Fortran:LINKER_LANGUAGE CXX:" ./CMakeLists.txt
18-
fi
19-
2016
cd "${BUILD_DIR}"
2117
ARR_CMAKE_FLAGS=()
2218
for i in ${CMAKE_FLAGS}; do ARR_CMAKE_FLAGS+=("${i}") ; done

0 commit comments

Comments
 (0)