如何解决 Volk 和 UHD 包的 CMake 警告?

How to solve the CMake warning for Volk and UHD package?

我正在尝试在 GNU Radio 中创建一个自定义块,它也需要使用 UHD。如本 link 所述,我将以下行添加到 gr-module/CMakeLists.txt:

find_package(UHD "3.10.0")

但是当我调用cmake../命令时,我得到以下两个警告:

1.The 第一个是给 Volk 的。

    CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
      The package name passed to `find_package_handle_standard_args` (VOLK) does
      not match the name of the calling package (Volk).  This can lead to
      problems in calling code that expects `find_package` result variables
      (e.g., `_FOUND`) to follow a certain pattern.
    Call Stack (most recent call first):
      /home/sohaib/prefix-3.8/lib/cmake/volk/VolkConfig.cmake:32 (find_package_handle_standard_args)
      /usr/share/cmake-3.21/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
      /home/sohaib/prefix-3.8/lib/cmake/gnuradio/GnuradioConfig.cmake:46 (find_dependency)
      CMakeLists.txt:89 (find_package)
    This warning is for project developers.  Use -Wno-dev to suppress it.

2.The 第二个是 UHD。

    CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
      The package name passed to `find_package_handle_standard_args` (PkgConfig)
      does not match the name of the calling package (UHD).  This can lead to
      problems in calling code that expects `find_package` result variables
      (e.g., `_FOUND`) to follow a certain pattern.
    Call Stack (most recent call first):
      /usr/share/cmake-3.21/Modules/FindPkgConfig.cmake:70 (find_package_handle_standard_args)
      /home/sohaib/prefix-3.8/lib/cmake/uhd/UHDConfig.cmake:42 (include)
      /home/sohaib/prefix-3.8/lib/cmake/gnuradio/FindUHD.cmake:43 (find_package)
      CMakeLists.txt:90 (find_package)
    This warning is for project developers.  Use -Wno-dev to suppress it.

几周前我在 GNU Radio 中构建了一个自定义块,当时没有收到任何警告。如果我从 CMakeLists.txt 中删除 find_package(UHD "3.10.0") 行,我只会收到 Volk 的警告。

如何解决这个警告?

你不能这样做(你可以寻找 Volk 而不是 VOLK,但它可能会破坏其他地方的东西) - 你也不必这样做,这只是警告,所以不需要任何操作。