Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
more tweaks to build script for Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
MintoDA1 authored and MintoDA1 committed Aug 12, 2023
1 parent 2f40ed0 commit 20abadb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions buildscripts/build_swiftest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ case $COMPILER in
;;
GNU-Mac)
export FC=$HOMEBREW_PREFIX/bin/gfortran-13
export CC=$HOMEBREW_PREFIX/bin/gcc-13
export CXX=$HOMEBREW_PREFIX/bin/g++-13
#export CC=$HOMEBREW_PREFIX/bin/gcc-13
#xport CXX=$HOMEBREW_PREFIX/bin/g++-13
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
;;
*)
echo "Unknown compiler type: ${COMPILER}"
Expand Down
8 changes: 4 additions & 4 deletions cmake/Modules/FindNETCDF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# If not, see: https://www.gnu.org/licenses.

# - Finds the NetCDF libraries

find_path(NETCDF_INCLUDE_DIR NAMES netcdf.mod HINTS ENV NETCDF_FORTRAN_HOME)
find_library(NETCDF_FORTRAN_LIBRARY NAMES netcdff HINTS ENV NETCDF_FORTRAN_HOME)
find_library(NETCDF_LIBRARY NAMES netcdf HINTS ENV NETCDF_FORTRAN_HOME)
set(NETCDF_FORTRAN_HOME $ENV{NETCDF_FORTRAN_HOME} CACHE STRING "Value of NetCDF library home directory")
find_path(NETCDF_INCLUDE_DIR NAMES netcdf.mod HINTS ENV NETCDF_FORTRAN_HOME PATH_SUFFIXES include)
find_library(NETCDF_FORTRAN_LIBRARY NAMES netcdff HINTS ENV NETCDF_FORTRAN_HOME PATH_SUFFIXES lib)
find_library(NETCDF_LIBRARY NAMES netcdf HINTS ENV NETCDF_FORTRAN_HOME PATH_SUFFIXES lib)

set(NETCDF_FOUND TRUE)
# Note for posterity: When building static libraries, NETCDF_FORTRAN_LIBRARY must come *before* NETCDF_LIBRARY. Otherwise you get a bunch of "undefined reference to" errors
Expand Down

0 comments on commit 20abadb

Please sign in to comment.