scorpio icon indicating copy to clipboard operation
scorpio copied to clipboard

Newer versions of CMake generate multiple warnings when finding packages

Open jayeshkrishna opened this issue 3 years ago • 0 comments

@bartgol reported this issue (and provided a fix),

When calling find_package with specific components requested, the current implementation of LibFind generates several warnings, like the following:

CMake Warning (dev) at /home/luca/workdir/utils/cmake/cmake-install/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args` (GPTL_C)
  does not match the name of the calling package (GPTL).  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/luca/workdir/scream/scream-src/master/externals/scorpio/cmake/LibFind.cmake:302 (find_package_handle_standard_args)
  /home/luca/workdir/scream/scream-src/master/externals/scorpio/cmake/FindGPTL.cmake:64 (find_package_component)
  /home/luca/workdir/scream/scream-src/master/externals/scorpio/src/clib/CMakeLists.txt:91 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

jayeshkrishna avatar Dec 02 '21 19:12 jayeshkrishna