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

CMake 3.31 warning due to path normalization #3605

Open
dmnks opened this issue Feb 27, 2025 · 2 comments
Open

CMake 3.31 warning due to path normalization #3605

dmnks opened this issue Feb 27, 2025 · 2 comments

Comments

@dmnks
Copy link
Contributor

dmnks commented Feb 27, 2025

When configuring rpm on Fedora 43 (Rawhide) that ships with cmake 3.31, the following warning is printed:

CMake Warning (dev) at plugins/CMakeLists.txt:16 (install):
  Policy CMP0177 is not set: install() DESTINATION paths are normalized.  Run
  "cmake --help-policy CMP0177" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

More details: https://cmake.org/cmake/help/latest/policy/CMP0177.html

This appears to be related to:

install(FILES org.rpm.conf DESTINATION ${dbus-1_DATADIR}/dbus-1/system.d/)

I'm not sure why the warning is printed, though, given the following (emphasis mine):

This policy was introduced in CMake version 3.31. It may be set by cmake_policy() or cmake_minimum_required(). If it is not set, CMake will warn if it detects a path that would be different if normalized, and uses OLD behavior.

Anyway, this probably needs a closer look, just to make sure we're not breaking any install paths.

@dmnks
Copy link
Contributor Author

dmnks commented Feb 27, 2025

Oh, now I know why. The value of ${dbus-1_DATADIR} is /usr/lib64/pkgconfig/../../share. Hmm.

@dmnks
Copy link
Contributor Author

dmnks commented Feb 27, 2025

I guess this is a non-issue. The resulting path that install() gets is different indeed but apparently it gets normalized at some later point anyway since the file does (and always did) get installed into the right location, i.e. /usr/share.

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

No branches or pull requests

1 participant