We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca5eb35 commit 2dcb8c7Copy full SHA for 2dcb8c7
2 files changed
tests/test_install_deps_policy.py
@@ -0,0 +1,17 @@
1
+from pathlib import Path
2
+
3
4
+def test_install_deps_sets_cmp0207_before_runtime_dependency_scan(
5
+ top_level_dir: Path,
6
+):
7
+ template = (
8
+ top_level_dir
9
+ / "vtk_sdk_python_wheel_helper"
10
+ / "install-deps.cmake.in"
11
+ ).read_text(encoding="utf-8")
12
13
+ policy_position = template.index("cmake_policy(SET CMP0207 NEW)")
14
+ runtime_deps_position = template.index("file(GET_RUNTIME_DEPENDENCIES")
15
16
+ assert "if(POLICY CMP0207)" in template
17
+ assert policy_position < runtime_deps_position
vtk_sdk_python_wheel_helper/install-deps.cmake.in
@@ -1,3 +1,7 @@
+if(POLICY CMP0207)
+ cmake_policy(SET CMP0207 NEW)
+endif()
file(GET_RUNTIME_DEPENDENCIES
RESOLVED_DEPENDENCIES_VAR resolved_deps
UNRESOLVED_DEPENDENCIES_VAR unresolved_deps
0 commit comments