Skip to content

Commit 71271fb

Browse files
author
teseoch
authored
cmake4 (#88)
* cmake4 * cache
1 parent e3b1e85 commit 71271fb

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/continuous.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
5555
- name: Cache Build
5656
id: cache-build
57-
uses: actions/cache@v4.0.2
57+
uses: actions/cache@v4
5858
with:
5959
path: ${{ env.CACHE_PATH }}
6060
key: ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }}
@@ -106,7 +106,7 @@ jobs:
106106
107107
- name: Cache build
108108
id: cache-build
109-
uses: actions/cache@v4.0.2
109+
uses: actions/cache@v4
110110
with:
111111
path: ${{ env.appdata }}\Mozilla\sccache
112112
key: ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }}

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
4242
- name: Cache Build
4343
id: cache-build
44-
uses: actions/cache@v4.0.2
44+
uses: actions/cache@v4
4545
with:
4646
path: ${{ env.CACHE_PATH }}
4747
key: ${{ runner.os }}-Release-${{ matrix.threading }}-cache-${{ github.sha }}

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ endif()
1010
set(REQUIRED_CMAKE_VERSION "3.18.0")
1111
if(POLYSOLVE_TOPLEVEL_PROJECT)
1212
cmake_minimum_required(VERSION ${REQUIRED_CMAKE_VERSION})
13+
SET(CMAKE_POLICY_VERSION_MINIMUM ${REQUIRED_CMAKE_VERSION})
14+
if(CMAKE_VERSION VERSION_GREATER_EQUAL "4.0.0")
15+
message(WARNING "CMake version is ${CMAKE_VERSION}, setting stuff for dependencies.")
16+
SET(CMAKE_POLICY_VERSION_MINIMUM ${REQUIRED_CMAKE_VERSION})
17+
set(POLYSOLVE_WITH_AMGCL OFF CACHE BOOL "Use AMGCL for solving linear systems")
18+
endif()
1319
else()
1420
# Don't use cmake_minimum_required here to avoid implicitly overriding parent policies
1521
if(${CMAKE_VERSION} VERSION_LESS ${REQUIRED_CMAKE_VERSION})

0 commit comments

Comments
 (0)