Skip to content

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

@ADKaster

Description

@ADKaster

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

Metadata

Metadata

Assignees

Labels

category:tool-updateThe issue is with build tool or build script, which requires update or should be executed correctly

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions