diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bdaeb3dc4f..1978e3e246 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,7 +40,7 @@ jobs: - ${{ github.event_name == 'cron' }} config: - name: "CMake, PETSc unreleased, ADIOS2" - os: ubuntu-20.04 + os: ubuntu-24.04 cmake_options: "-DBUILD_SHARED_LIBS=ON -DBOUT_ENABLE_METRIC_3D=ON -DBOUT_ENABLE_OPENMP=ON @@ -58,13 +58,13 @@ jobs: build_adios2: true on_cron: true - - name: "Default options, Ubuntu 20.04" - os: ubuntu-20.04 + - name: "Default options, Ubuntu 22.04" + os: ubuntu-22.04 cmake_options: "" on_cron: false - name: "Optimised, static" - os: ubuntu-20.04 + os: ubuntu-latest cmake_options: "-DCHECK=0 -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=-Ofast @@ -78,7 +78,7 @@ jobs: on_cron: false - name: "Debug, shared" - os: ubuntu-20.04 + os: ubuntu-latest cmake_options: "-DCHECK=3 -DCMAKE_BUILD_TYPE=Debug -DBOUT_ENABLE_SIGNAL=ON @@ -89,8 +89,8 @@ jobs: -DSUNDIALS_ROOT=/home/runner/local" on_cron: false - - name: "Shared, release, Ubuntu 20.04" - os: ubuntu-20.04 + - name: "Shared, release" + os: ubuntu-latest cmake_options: "-DBUILD_SHARED_LIBS=ON -DBOUT_ENABLE_OPENMP=ON -DCMAKE_BUILD_TYPE=Release @@ -116,7 +116,7 @@ jobs: on_cron: false - name: "CMake, new PETSc" - os: ubuntu-20.04 + os: ubuntu-latest cmake_options: "-DBUILD_SHARED_LIBS=ON -DBOUT_ENABLE_METRIC_3D=ON -DBOUT_ENABLE_OPENMP=ON @@ -131,7 +131,7 @@ jobs: on_cron: false - name: "Coverage" - os: ubuntu-20.04 + os: ubuntu-latest cmake_options: "-DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -DCHECK=3 diff --git a/CMakeLists.txt b/CMakeLists.txt index f57a78a14a..5e1924ba1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -794,8 +794,15 @@ foreach (flag ${CONFIG_LDFLAGS_LIST}) # message("${flag} is a file") set(_CONFIG_LDFLAGS "${_CONFIG_LDFLAGS} ${flag}") else() - message("Fixing ${flag} to -l${flag}") - set(_CONFIG_LDFLAGS "${_CONFIG_LDFLAGS} -l${flag}") + string(FIND "${flag}" "::" hascolcol) + if (${hascolcol} EQUAL -1) + message("Fixing ${flag} to -l${flag}") + set(_CONFIG_LDFLAGS "${_CONFIG_LDFLAGS} -l${flag}") + else() + string(REGEX MATCH "[^:]*$" flag2 "${flag}") + message("Fixing ${flag} to -l${flag2}") + set(_CONFIG_LDFLAGS "${_CONFIG_LDFLAGS} -l${flag2}") + endif() endif() endif() endforeach()