Skip to content

Commit 917853d

Browse files
committed
make examples more robust
1 parent 5ce625b commit 917853d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/ci_mac.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v2
1616

17-
- run: brew install pkg-config netcdf ninja
17+
- run: brew install gcc netcdf ninja
1818

1919
- run: ctest -S setup.cmake -VV
20-
env:
21-
FC: gfortran-9
22-
CC: gcc-9
2320

2421
- name: build examples
2522
run: |

Examples/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
cmake_minimum_required(VERSION 3.14)
1+
cmake_minimum_required(VERSION 3.15)
2+
3+
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/policy.cmake)
4+
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/compiler_find.cmake)
5+
26
project(nc4fortranExample
3-
LANGUAGES C CXX Fortran)
7+
LANGUAGES Fortran)
48
enable_testing()
59

10+
# see if ncfortran is installed; build if not found
611
find_package(nc4fortran CONFIG)
712

813
if(nc4fortran_FOUND)

0 commit comments

Comments
 (0)