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

[vcpkg scripts] CMake policy CMP0174 warning from every package with CMake 3.31 #41999

Open
ADKaster opened this issue Nov 7, 2024 · 7 comments · May be fixed by #42045
Open

[vcpkg scripts] CMake policy CMP0174 warning from every package with CMake 3.31 #41999

ADKaster opened this issue Nov 7, 2024 · 7 comments · May be fixed by #42045
Assignees
Labels
category:question This issue is a question

Comments

@ADKaster
Copy link
Contributor

ADKaster commented Nov 7, 2024

Describe the bug
With CMake 3.31, every call to z_vcpkg_find_acquire_program_find_external or z_vcpkg_find_acquire_program_find_internal is giving a dev warning from one of two places: line 70 or line 30

Environment

  • OS: Ubuntu 24.04
  • Compiler: clang-18
  • CMake: 3.31 (from kitware apt repos)

To Reproduce
Steps to reproduce the behavior:
0. install cmake 3.31+

  1. ./vcpkg install woff2
  2. See dev warnings
CMake Warning (dev) at scripts/cmake/vcpkg_find_acquire_program.cmake:70 (cmake_parse_arguments):
  The INTERPRETER keyword was followed by an empty string or no value at all.
  Policy CMP0174 is not set, so cmake_parse_arguments() will unset the
  arg_INTERPRETER variable rather than setting it to an empty string.
Call Stack (most recent call first):
  scripts/cmake/vcpkg_find_acquire_program.cmake:143 (z_vcpkg_find_acquire_program_find_internal)
  scripts/cmake/vcpkg_fixup_pkgconfig.cmake:193 (vcpkg_find_acquire_program)
  buildtrees/versioning_/versions/woff2/fbd2207ad0ad1e7e52b421b86f96deff9ed7ec65/portfile.cmake:33 (vcpkg_fixup_pkgconfig)
  scripts/ports.cmake:192 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Installing: /home/andrew/ladybird-org/ladybird-browser/Build/vcpkg/packages/woff2_x64-linux/share/woff2/copyright
CMake Warning (dev) at scripts/cmake/vcpkg_find_acquire_program.cmake:70 (cmake_parse_arguments):
  The INTERPRETER keyword was followed by an empty string or no value at all.
  Policy CMP0174 is not set, so cmake_parse_arguments() will unset the
  arg_INTERPRETER variable rather than setting it to an empty string.
Call Stack (most recent call first):
  scripts/cmake/vcpkg_find_acquire_program.cmake:143 (z_vcpkg_find_acquire_program_find_internal)
  scripts/cmake/z_vcpkg_fixup_rpath.cmake:96 (vcpkg_find_acquire_program)
  scripts/ports.cmake:202 (z_vcpkg_fixup_rpath_in_dir)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at scripts/cmake/vcpkg_find_acquire_program.cmake:30 (cmake_parse_arguments):
  The INTERPRETER keyword was followed by an empty string or no value at all.
  Policy CMP0174 is not set, so cmake_parse_arguments() will unset the
  arg_INTERPRETER variable rather than setting it to an empty string.
Call Stack (most recent call first):
  scripts/cmake/vcpkg_find_acquire_program.cmake:149 (z_vcpkg_find_acquire_program_find_external)
  scripts/cmake/z_vcpkg_fixup_rpath.cmake:96 (vcpkg_find_acquire_program)
  scripts/ports.cmake:202 (z_vcpkg_fixup_rpath_in_dir)
This warning is for project developers.  Use -Wno-dev to suppress it.

Expected behavior
No warnings from vcpkg internals.

I would still like to have CMake dev warnings for my own scripts in my project, so -Wno-dev doesn't seem appealing

Failure logs
N/A

Additional context
None

@MonicaLiu0311 MonicaLiu0311 added the category:port-update The issue is with a library, which is requesting update new revision label Nov 7, 2024
@MonicaLiu0311 MonicaLiu0311 changed the title scripts: CMake policy CMP0174 warning from every package with CMake 3.31 [vcpkg scripts] CMake policy CMP0174 warning from every package with CMake 3.31 Nov 7, 2024
@MonicaLiu0311 MonicaLiu0311 removed the category:port-update The issue is with a library, which is requesting update new revision label Nov 7, 2024
@dg0yt
Copy link
Contributor

dg0yt commented Nov 7, 2024

Is there a release of 3.31? This issues was observed in the release candidates.

@dg0yt
Copy link
Contributor

dg0yt commented Nov 7, 2024

@ADKaster
Copy link
Contributor Author

ADKaster commented Nov 7, 2024

3.31.0 was tagged today, Wed Nov 6. https://gitlab.kitware.com/cmake/cmake/-/commits/v3.31.0?ref_type=tags

@dg0yt
Copy link
Contributor

dg0yt commented Nov 7, 2024

But which version did you actual test?

@dg0yt
Copy link
Contributor

dg0yt commented Nov 7, 2024

The fix is trivial, but it invalidates most cached binary artifacts (aka world rebuild).

@jeanga
Copy link
Contributor

jeanga commented Nov 7, 2024

But which version did you actual test?

It reproes with the released version of cmake 3.31 (available via winget)

@MonicaLiu0311 MonicaLiu0311 added the category:question This issue is a question label Nov 7, 2024
@ADKaster
Copy link
Contributor Author

ADKaster commented Nov 7, 2024

But which version did you actual test?

$ cmake --version
cmake version 3.31.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).

From https://apt.kitware.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants