From 287912d6fc7ab0ab0b5f69a4a5260b5bf53121ba Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 5 Nov 2020 00:14:32 +0100 Subject: Rename CMake find_package helpers to avoid developer warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit | CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message): | The package name passed to `find_package_handle_standard_args` (Berkeley) | does not match the name of the calling package (BerkeleyDB). 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/FindBerkeleyDB.cmake:57 (find_package_handle_standard_args) | CMakeLists.txt:83 (find_package) | This warning is for project developers. Use -Wno-dev to suppress it. And indeed, we checked for BERKLEY_DB_FOUND which was not defined so our HAVE_BDB was not set – just that it is never used, so it wasn't noticed. --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f4afce7ea..51f0c25d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,8 +80,8 @@ add_optional_compile_options(Wsuggest-override) add_optional_compile_options(Werror=suggest-override) add_optional_compile_options(Werror=return-type) # apt-ftparchive dependencies -find_package(BerkeleyDB REQUIRED) -if (BERKELEY_DB_FOUND) +find_package(Berkeley REQUIRED) +if (BERKELEY_FOUND) set(HAVE_BDB 1) endif() @@ -113,7 +113,7 @@ if (LZ4_FOUND) set(HAVE_LZ4 1) endif() -find_package(Zstd) +find_package(ZSTD) if (ZSTD_FOUND) set(HAVE_ZSTD 1) endif() @@ -129,12 +129,12 @@ if (SYSTEMD_FOUND) set(HAVE_SYSTEMD 1) endif() -find_package(Seccomp) +find_package(SECCOMP) if (SECCOMP_FOUND) set(HAVE_SECCOMP 1) endif() -find_package(Gcrypt REQUIRED) +find_package(GCRYPT REQUIRED) # Mount()ing and stat()ing and friends check_symbol_exists(statfs sys/vfs.h HAVE_VFS_H) -- cgit v1.2.3