Skip to content

Commit

Permalink
cmake: fix warning for passed package name
Browse files Browse the repository at this point in the history
CMake produces warnings like below:

CMake Warning (dev) at /home/sergeyb/.local/lib/python3.8/site-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (TARANTOOL)
  does not match the name of the calling package (Tarantool).  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/FindTarantool.cmake:27 (find_package_handle_standard_args)
  CMakeLists.txt:11 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

This patch fixes package name, warning is gone and output
becomes clear and readable.
  • Loading branch information
ligurio committed Apr 1, 2022
1 parent 4043e43 commit acc64d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/FindTarantool.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if(TARANTOOL_INCLUDE_DIR)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TARANTOOL
find_package_handle_standard_args(Tarantool
REQUIRED_VARS TARANTOOL_INCLUDE_DIR VERSION_VAR TARANTOOL_VERSION)
if(TARANTOOL_FOUND)
set(TARANTOOL_INCLUDE_DIRS "${TARANTOOL_INCLUDE_DIR}"
Expand Down

0 comments on commit acc64d6

Please sign in to comment.