Skip to content

Commit

Permalink
cmake >= 3.20 tested in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Jul 31, 2024
1 parent be5e803 commit b9ddf60
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ jobs:
uses: ./.github/workflows/composite-example


cmake-320:
cmake-older:
timeout-minutes: 30

runs-on: ubuntu-20.04
runs-on: ubuntu-latest

strategy:
matrix:
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/composite-cmake/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@ runs:
using: "composite"

steps:
- name: environment
shell: bash
run: |
echo "osarch=linux-x86_64" >> $GITHUB_ENV
echo "archive=linux-x86_64.tar.gz" >> $GITHUB_ENV
- name: Install CMake ${{ matrix.cmake_version }}
shell: bash
run: |
curl -LO "https://github.com/Kitware/CMake/releases/download/v${{ matrix.cmake_version }}/cmake-${{ matrix.cmake_version }}-linux-x86_64.tar.gz"
tar -xf cmake-${{ matrix.cmake_version }}-linux-x86_64.tar.gz
curl -LO "https://github.com/Kitware/CMake/releases/download/v${{ matrix.cmake_version }}/cmake-${{ matrix.cmake_version }}-$archive"
tar -xf cmake-${{ matrix.cmake_version }}-$archive
- name: CMake path
shell: bash
run: |
echo "CMAKE=$GITHUB_WORKSPACE/cmake-${{ matrix.cmake_version }}-linux-x86_64/bin/cmake" >> $GITHUB_ENV
echo "CTEST=$GITHUB_WORKSPACE/cmake-${{ matrix.cmake_version }}-linux-x86_64/bin/ctest" >> $GITHUB_ENV
echo "CMAKE=$GITHUB_WORKSPACE/cmake-${{ matrix.cmake_version }}-$osarch/bin/cmake" >> $GITHUB_ENV
echo "CTEST=$GITHUB_WORKSPACE/cmake-${{ matrix.cmake_version }}-$osarch/bin/ctest" >> $GITHUB_ENV
- name: echo CMake version
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19...3.30)
cmake_minimum_required(VERSION 3.20...3.30)

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "Please use out of source build:
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindSCALAPACK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ DOC "SCALAPACK library"

# some systems have libblacs as a separate file, instead of being subsumed in libscalapack.
if(NOT DEFINED BLACS_ROOT)
get_filename_component(BLACS_ROOT ${SCALAPACK_LIBRARY} DIRECTORY)
cmake_path(GET SCALAPACK_LIBRARY PARENT_PATH BLACS_ROOT)
endif()

find_library(BLACS_LIBRARY
Expand Down
2 changes: 1 addition & 1 deletion example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ endif()
if(WIN32)
get_property(imp_mumps TARGET MUMPS::COMMON PROPERTY IMPORTED_LOCATION_RELEASE)
if(imp_mumps)
get_filename_component(imp_mumps_dir ${imp_mumps} DIRECTORY)
cmake_path(GET imp_mumps PARENT_PATH imp_mumps_dir)
endif()
set_property(TEST ${test_names} PROPERTY
ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${imp_mumps_dir};PATH=path_list_prepend:${CMAKE_PREFIX_PATH}/bin"
Expand Down
2 changes: 1 addition & 1 deletion example/metis/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19)
cmake_minimum_required(VERSION 3.20)

project(MUMPSmetisExamples
LANGUAGES C Fortran
Expand Down
2 changes: 1 addition & 1 deletion example/scotch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19)
cmake_minimum_required(VERSION 3.20)

project(MUMPSscotchExamples
LANGUAGES C Fortran
Expand Down
4 changes: 2 additions & 2 deletions scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19)
cmake_minimum_required(VERSION 3.20)

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "please use out of source build
Expand Down Expand Up @@ -105,7 +105,7 @@ if(NOT bison)
endif()

message(STATUS "Bison found: ${bison}")
get_filename_component(bison_root ${bison} DIRECTORY)
cmake_path(GET bison PARENT_PATH bison_root)

set(BISON_ROOT ${bison_root} PARENT_SCOPE)

Expand Down
2 changes: 1 addition & 1 deletion scripts/build_metis.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19)
cmake_minimum_required(VERSION 3.20)

option(intsize64 "use 64-bit integers in C and Fortran--METIS must be consistent with MUMPS")

Expand Down
2 changes: 1 addition & 1 deletion scripts/build_scotch.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19)
cmake_minimum_required(VERSION 3.20)

option(intsize64 "use 64-bit integers in C and Fortran--Scotch must be consistent with MUMPS")

Expand Down

0 comments on commit b9ddf60

Please sign in to comment.