Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch VTK CMP0174 policy in CI #1709

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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