Skip to content

Commit

Permalink
Added SCHISM macports cmake presets
Browse files Browse the repository at this point in the history
  • Loading branch information
platipodium committed Mar 5, 2024
1 parent dfe5081 commit fefb7aa
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cmake/SCHISM.homebrew.gcc-openmpi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# CMake presets for compiling on a homebrew (linux/mac) system
#
# SPDX-FileCopyrightText: 2024 Helmholtz-Zentrum hereon GmbH
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileContributor: Carsten Lemmen <[email protected]>
#
# Prerequisites
# `brew install gcc@13 gfortran cmake make`
# `brew install -cc=gcc open-mpi netcdf netcdf-fortran`
#
set(CMAKE_Fortran_COMPILER /opt/homebrew/bin/mpifort CACHE PATH "Path to parallel Fortran compiler")
set(CMAKE_C_COMPILER /opt/homebrew/bin/mpicc CACHE PATH "Path to parallel C compiler")
set(CMAKE_CXX_COMPILER /opt/local/bin/mpicxx CACHE PATH "Path to parallel C++ compiler")
set(CMAKE_Fortran_FLAGS "-ffree-line-length-none -fallow-argument-mismatch" CACHE STRING "Fortran flags" FORCE)
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -ffree-line-length-none -static-libgfortran -finit-local-zero" CACHE STRING "Fortran release flags" FORCE)
set(NetCDF_FORTRAN_DIR /opt/homebrew CACHE PATH "Path to NetCDF Fortran library")
set(NetCDF_C_DIR /opt/homebrew CACHE PATH "Path to NetCDF C library")
set(BLD_STANDALONE "ON" CACHE STRING "Build standalone pschism")
16 changes: 16 additions & 0 deletions cmake/SCHISM.macports.gcc-openmpi
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# CMake presets for compiling on a macports system
#
# SPDX-FileCopyrightText: 2021-2024 Helmholtz-Zentrum hereon GmbH
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileContributor: Carsten Lemmen <[email protected]>
#
# Prerequisites
# `port install netcdf-fortran+gcc13+openmpi`
#
set(CMAKE_Fortran_COMPILER /opt/local/bin/gfortran CACHE PATH "Path to serial Fortran compiler")
set(CMAKE_C_COMPILER /opt/local/bin/gcc CACHE PATH "Path to serial C compiler")
set(CMAKE_CXX_COMPILER /opt/local/bin/g++ CACHE PATH "Path to serial C++ compiler")
set(CMAKE_Fortran_FLAGS "-ffree-line-length-none -fallow-argument-mismatch" CACHE STRING "Fortran flags" FORCE)
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -static-libgfortran -finit-local-zero" CACHE STRING "Fortran release flags" FORCE)
set(NetCDF_FORTRAN_DIR /opt/local CACHE PATH "Path to NetCDF Fortran library")
set(NetCDF_C_DIR /opt/local CACHE PATH "Path to NetCDF C library")

0 comments on commit fefb7aa

Please sign in to comment.