diff --git a/.github/actions/vtk-install-dep/action.yml b/.github/actions/vtk-install-dep/action.yml index 8861c415d8..9178da5198 100644 --- a/.github/actions/vtk-install-dep/action.yml +++ b/.github/actions/vtk-install-dep/action.yml @@ -43,7 +43,7 @@ runs: uses: actions/cache@v4 with: path: dependencies/vtk_install - key: vtk-${{env.VTK_SHA_OR_TAG}}-${{runner.os}}-${{inputs.raytracing_label}}-${{inputs.cpu}}-3 + key: vtk-${{env.VTK_SHA_OR_TAG}}-${{runner.os}}-${{inputs.raytracing_label}}-${{inputs.cpu}}-4 - name: Setup VTK if: steps.cache-vtk.outputs.cache-hit != 'true' @@ -64,6 +64,16 @@ runs: path: './dependencies/vtk' ref: ${{env.VTK_SHA_OR_TAG}} + # CMake 3.31 introduced a new policy producing a warning when using vtkModule.cmake + # See https://gitlab.kitware.com/vtk/vtk/-/issues/19526 + - name: Patch VTK + if: steps.cache-vtk.outputs.cache-hit != 'true' + working-directory: ${{github.workspace}}/dependencies/vtk + shell: bash + run: | + cat $GITHUB_ACTION_PATH/set_cmp0177_policy.cmake CMake/vtkModule.cmake > patched.cmake + mv patched.cmake CMake/vtkModule.cmake + # OpenVDB_CMAKE_PATH is required because of # https://github.com/AcademySoftwareFoundation/openvdb/issues/1160 and # https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10393 diff --git a/.github/actions/vtk-install-dep/set_cmp0177_policy.cmake b/.github/actions/vtk-install-dep/set_cmp0177_policy.cmake new file mode 100644 index 0000000000..163cc9ccc8 --- /dev/null +++ b/.github/actions/vtk-install-dep/set_cmp0177_policy.cmake @@ -0,0 +1,4 @@ +# CMake 3.31 trigger a warning without this policy set +if(POLICY CMP0174) + cmake_policy(SET CMP0174 OLD) +endif() diff --git a/examples/libf3d/CMakeLists.txt b/examples/libf3d/CMakeLists.txt index a0975c1214..85d9e51aba 100644 --- a/examples/libf3d/CMakeLists.txt +++ b/examples/libf3d/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(libf3d-examples) diff --git a/examples/libf3d/cpp/check-engine/CMakeLists.txt b/examples/libf3d/cpp/check-engine/CMakeLists.txt index 88c4ff1a9d..98dbcb4824 100644 --- a/examples/libf3d/cpp/check-engine/CMakeLists.txt +++ b/examples/libf3d/cpp/check-engine/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(check-engine) diff --git a/examples/libf3d/cpp/multi-files/CMakeLists.txt b/examples/libf3d/cpp/multi-files/CMakeLists.txt index 97158b5b4d..fbb6710ee9 100644 --- a/examples/libf3d/cpp/multi-files/CMakeLists.txt +++ b/examples/libf3d/cpp/multi-files/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(multi-files) diff --git a/examples/libf3d/cpp/render-image/CMakeLists.txt b/examples/libf3d/cpp/render-image/CMakeLists.txt index c6dfd39c25..a57cd599eb 100644 --- a/examples/libf3d/cpp/render-image/CMakeLists.txt +++ b/examples/libf3d/cpp/render-image/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(render-image) diff --git a/examples/libf3d/cpp/render-interact/CMakeLists.txt b/examples/libf3d/cpp/render-interact/CMakeLists.txt index a3b4d188f5..c1fec51923 100644 --- a/examples/libf3d/cpp/render-interact/CMakeLists.txt +++ b/examples/libf3d/cpp/render-interact/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(render-interact) diff --git a/examples/libf3d/cpp/use-options-string/CMakeLists.txt b/examples/libf3d/cpp/use-options-string/CMakeLists.txt index 3b6f15f814..704599d8ab 100644 --- a/examples/libf3d/cpp/use-options-string/CMakeLists.txt +++ b/examples/libf3d/cpp/use-options-string/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(use-options-string) diff --git a/examples/libf3d/cpp/use-options-struct/CMakeLists.txt b/examples/libf3d/cpp/use-options-struct/CMakeLists.txt index eda9e06a5a..ce1d6b49a9 100644 --- a/examples/libf3d/cpp/use-options-struct/CMakeLists.txt +++ b/examples/libf3d/cpp/use-options-struct/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(use-options-struct) diff --git a/examples/libf3d/cpp/use-options-variant/CMakeLists.txt b/examples/libf3d/cpp/use-options-variant/CMakeLists.txt index 3a02711ef4..99bc91eb9f 100644 --- a/examples/libf3d/cpp/use-options-variant/CMakeLists.txt +++ b/examples/libf3d/cpp/use-options-variant/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(use-options-variant)