Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac build #18

Merged
merged 7 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Mac

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:
gnu:
runs-on: macos-latest
strategy:
matrix:
gcc_version: [11, 12, 13]
build_type: [Debug, Release]
env:
FC: gfortran-${{ matrix.gcc_version }}

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: brew install netcdf netcdf-fortran

- name: Run Cmake
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.build_type }}

- name: Build
run: cmake --build build --verbose
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set(CloudJ_Fortran_FLAGS_DEBUG_Intel

set(CloudJ_Fortran_FLAGS_GNU
-cpp -w -std=legacy -fautomatic -fno-align-commons -fconvert=big-endian
-fno-range-check -mcmodel=medium -fbacktrace -g -DLINUX_GFORTRAN
-fno-range-check -mcmodel=small -fbacktrace -g -DLINUX_GFORTRAN
-ffree-line-length-none
CACHE STRING "Cloud-J compiler flags for all build types with GNU compilers"
)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Cloud-J

[![Ubuntu](https://github.com/geoschem/Cloud-J/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/geoschem/Cloud-J/actions/workflows/ubuntu.yml)
[![Mac](https://github.com/geoschem/Cloud-J/actions/workflows/mac.yml/badge.svg)](https://github.com/geoschem/Cloud-J/actions/workflows/mac.yml)
[![License](https://img.shields.io/badge/license-GPLv3-blue)](https://github.com/geoschem/Cloud-J/blob/main/LICENSE)

Cloud-J is a multi-scattering eight-stream radiative transfer model for solar radiation based on Fast-J. It was originally developed by Michael J. Prather (UCI). For information about the origins and history of Cloud-J and its predecessor Fast-J please see the [history document](https://github.com/geoschem/cloud-j/blob/main/docs/History_of_Fast-J_photolysis_code.md) in the docs subdirectory of this repository.
Expand Down
17 changes: 1 addition & 16 deletions src/Interfaces/Standalone/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
# Cloud-J/src/CMakeLists.txt

add_library(CloudJ_Standalone STATIC EXCLUDE_FROM_ALL
CJ77.F90
)
target_link_libraries(CloudJ_Standalone
PUBLIC CloudJ_Core
)
target_include_directories(CloudJ_Standalone
INTERFACE ${CLOUDJ_BINARY_DIR}/mod
)
target_compile_options(CloudJ_Standalone
PRIVATE
""
$<$<STREQUAL:"${CMAKE_Fortran_COMPILER_ID}","GNU">:-ffree-line-length-none>
)
lizziel marked this conversation as resolved.
Show resolved Hide resolved

#if("cloudj_standalone" IN_LIST CLOUDJ_EXE_TARGETS)
add_executable(cloudj_standalone
CJ77.F90
)
target_link_libraries(cloudj_standalone
PUBLIC CloudJ_Standalone
PUBLIC CloudJ_Core
)
set_target_properties(cloudj_standalone PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
Expand Down