Skip to content

Commit

Permalink
Patch VTK CMP0174 policy in CI (f3d-app#1709)
Browse files Browse the repository at this point in the history
  • Loading branch information
Meakk authored and Yogesh9000 committed Nov 15, 2024
1 parent 19fe39d commit 71af4dc
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 9 deletions.
12 changes: 11 additions & 1 deletion .github/actions/vtk-install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/vtk-install-dep/set_cmp0177_policy.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# CMake 3.31 trigger a warning without this policy set
if(POLICY CMP0174)
cmake_policy(SET CMP0174 OLD)
endif()
2 changes: 1 addition & 1 deletion examples/libf3d/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)

project(libf3d-examples)

Expand Down
2 changes: 1 addition & 1 deletion examples/libf3d/cpp/check-engine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)

project(check-engine)

Expand Down
2 changes: 1 addition & 1 deletion examples/libf3d/cpp/multi-files/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)

project(multi-files)

Expand Down
2 changes: 1 addition & 1 deletion examples/libf3d/cpp/render-image/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)

project(render-image)

Expand Down
2 changes: 1 addition & 1 deletion examples/libf3d/cpp/render-interact/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)

project(render-interact)

Expand Down
2 changes: 1 addition & 1 deletion examples/libf3d/cpp/use-options-string/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)

project(use-options-string)

Expand Down
2 changes: 1 addition & 1 deletion examples/libf3d/cpp/use-options-struct/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)

project(use-options-struct)

Expand Down
2 changes: 1 addition & 1 deletion examples/libf3d/cpp/use-options-variant/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)

project(use-options-variant)

Expand Down

0 comments on commit 71af4dc

Please sign in to comment.