File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,24 @@ name: test
33on : [push, pull_request]
44
55jobs :
6+ cmake :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - name : Checkout code
10+ uses : actions/checkout@v4
11+
12+ - name : Install GFortran and LAPACK
13+ run : sudo apt-get install -y gfortran liblapack-dev libblas-dev
14+
15+ - name : Configure
16+ run : cmake -B build -DCMAKE_BUILD_TYPE=Release
17+
18+ - name : Build
19+ run : cmake --build build
20+
21+ - name : Test
22+ run : ctest --test-dir build --output-on-failure
23+
624 gfortran-nix :
725 runs-on : ${{ matrix.os }}
826 strategy :
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.14 )
2+
3+ project (stiff3
4+ VERSION 0.1.0
5+ DESCRIPTION "Adaptive solver for stiff systems of ODEs"
6+ LANGUAGES Fortran
7+ )
8+
9+ # Find LAPACK (which typically pulls in BLAS as well)
10+ find_package (LAPACK REQUIRED )
11+
12+ include (CTest )
13+
14+ add_subdirectory (src )
15+ add_subdirectory (example )
Original file line number Diff line number Diff line change 1+ foreach (example robertson vanpol)
2+ add_executable (${example} ${example} .f90 )
3+ target_link_libraries (${example} PRIVATE stiff3 )
4+ add_test (NAME ${example} COMMAND ${example} )
5+ endforeach ()
Original file line number Diff line number Diff line change 1+ add_library (stiff3
2+ stiff3_linalg.f90
3+ stiff3_solver.f90
4+ )
5+
6+ target_link_libraries (stiff3 PUBLIC ${LAPACK_LIBRARIES} )
7+
8+ target_include_directories (stiff3 PUBLIC
9+ $<BUILD_INTERFACE :${CMAKE_CURRENT_BINARY_DIR} >
10+ )
You can’t perform that action at this time.
0 commit comments