Skip to content

fix: remove leading ./ from install DESTINATION paths - #570

Merged
rwmcguir merged 1 commit into
masterfrom
fix_cmp0177_install_paths
Dec 2, 2026
Merged

rwmcguir merged 1 commit into
masterfrom
fix_cmp0177_install_paths

Conversation

@rwmcguir

@rwmcguir rwmcguir commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

So with CMake 3.31 and newer, configure now prints a policy warning for CMP0177 (install() DESTINATION paths are normalized) on four of our install() calls, i.e. the three libze-dev header installs and the SDK setup script install for the MSI. Since we declare cmake_minimum_required(VERSION 3.12.0) the policy is unset, and CMake warns because a path like ./include/level_zero would be written differently under the new behavior.

A relative DESTINATION is always taken from CMAKE_INSTALL_PREFIX, so ./include/level_zero and include/level_zero are the same folder. Dropping the ./ gives the same result under both the old and new policy behavior, so no cmake_policy() call or minimum version bump is needed.

What I checked on Linux:

  • CMake 4.5.1, before: 3 CMP0177 warnings (lines 306, 311, 316), after: none
  • cmake --install --component libze-dev before and after, same 15 files in the same folders
  • CMake 3.28.3 still configures with no warnings

The ./scripts one is in the Windows installer branch, will be tested by CI.

CMake 3.31 added policy CMP0177, which normalizes install()
DESTINATION paths. With cmake_minimum_required(VERSION 3.12) the
policy is unset, so CMake 3.31 and newer warn on every DESTINATION
that starts with "./".

A relative DESTINATION is always taken from CMAKE_INSTALL_PREFIX, so
"./include/level_zero" and "include/level_zero" are the same folder.
Dropping the "./" gives the same install layout with both the old
and new policy behavior, and the warning goes away on every CMake
version.

Signed-off-by: Russell McGuire <russell.w.mcguire@intel.com>
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Level Zero loader ABI check

last-release (v1.36.0): ✅ no ABI problems. Report

Creating compatibility report ...
Binary compatibility: 100%
Source compatibility: 100%
Total binary compatibility problems: 0, warnings: 0
Total source compatibility problems: 0, warnings: 0

master (master): ✅ no ABI problems. Report

Creating compatibility report ...
Binary compatibility: 100%
Source compatibility: 100%
Total binary compatibility problems: 0, warnings: 0
Total source compatibility problems: 0, warnings: 0

Workflow run

If an ABI change is intended, a reviewer with write access can accept it: leave an approval review on the PR head commit with the keyword abi-failure-approved in the review body. That re-runs the check.

@rwmcguir
rwmcguir requested a review from nrspruit December 2, 2026 00:23
@rwmcguir
rwmcguir merged commit 3012578 into master Dec 2, 2026
71 checks passed
@rwmcguir
rwmcguir deleted the fix_cmp0177_install_paths branch December 2, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants