Repository navigation
fix: remove leading ./ from install DESTINATION paths - #570
Merged
Merged
Conversation
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>
Level Zero loader ABI checklast-release ( master ( 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 |
nrspruit
approved these changes
Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_zerowould be written differently under the new behavior.A relative DESTINATION is always taken from CMAKE_INSTALL_PREFIX, so
./include/level_zeroandinclude/level_zeroare 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 --install --component libze-devbefore and after, same 15 files in the same foldersThe
./scriptsone is in the Windows installer branch, will be tested by CI.