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: Silence find_package_handle_standard_args warnings #9750

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

orbea
Copy link
Contributor

@orbea orbea commented Apr 25, 2020

Fixes #9734

This silences cmake warnings with cmake-3.17.1 by renaming the variables accordingly.

CMake Warning (dev) at /usr/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (JSONCPP)
  does not match the name of the calling package (Json).  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):
  cmake/Modules/FindJson.cmake:14 (find_package_handle_standard_args)
  CMakeLists.txt:208 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at /usr/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (LuaJit)
  does not match the name of the calling package (LuaJIT).  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):
  cmake/Modules/FindLuaJIT.cmake:58 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/Modules/FindLua.cmake:11 (find_package)
  CMakeLists.txt:209 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at /usr/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (GetText)
  does not match the name of the calling package (GettextLib).  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):
  cmake/Modules/FindGettextLib.cmake:58 (find_package_handle_standard_args)
  src/CMakeLists.txt:64 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at /usr/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (VORBIS)
  does not match the name of the calling package (Vorbis).  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):
  cmake/Modules/FindVorbis.cmake:23 (find_package_handle_standard_args)
  src/CMakeLists.txt:86 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

To do

Ready for Review.

How to test

Build minetest with a new enough cmake version. Using -DENABLE_SYSTEM_JSONCPP=yes is required to reproduce the jsoncpp warning.

@sfan5 sfan5 added @ Build CMake, build scripts, official builds, compiler and linker errors Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements labels Apr 25, 2020
@sfan5 sfan5 changed the title cmake: Silence warnings. cmake: Silence find_package_handle_standard_args warnings Apr 25, 2020
Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works.

@nerzhul nerzhul merged commit a368e7e into minetest:master Apr 28, 2020
@orbea orbea deleted the cmake branch April 28, 2020 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Build CMake, build scripts, official builds, compiler and linker errors Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements One approval ✅ ◻️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake warnings
3 participants