We have this warning when building with CMake 3.17.0-rc2: -- Found Perl: /usr/bin/perl (found suitable version "5.30.1", minimum required is "5.10.0") CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (PerlModules_JSON::PP) does not match the name of the calling package (PerlModules). 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): Source/cmake/FindPerlModules.cmake:68 (find_package_handle_standard_args) Source/cmake/WebKitCommon.cmake:18 (find_package) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. -- Found PerlModules_JSON::PP: TRUE -- Found PerlModules: TRUE found components: JSON::PP
BTW I don't understand how to fix it. The call in WebKitCommon.cmake looks fine, so I guess CMake doesn't like how we've implemented our FindPerlModules.cmake.
(In reply to Michael Catanzaro from comment #1) > BTW I don't understand how to fix it. The call in WebKitCommon.cmake looks > fine, so I guess CMake doesn't like how we've implemented our > FindPerlModules.cmake. Looks like you're rewriting all the perl to be python.
(In reply to Michael Catanzaro from comment #0) > We have this warning when building with CMake 3.17.0-rc2: > > > -- Found Perl: /usr/bin/perl (found suitable version "5.30.1", minimum > required is "5.10.0") > CMake Warning (dev) at > /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): > The package name passed to `find_package_handle_standard_args` > (PerlModules_JSON::PP) does not match the name of the calling package > (PerlModules). 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): > Source/cmake/FindPerlModules.cmake:68 (find_package_handle_standard_args) > Source/cmake/WebKitCommon.cmake:18 (find_package) > CMakeLists.txt:169 (include) > This warning is for project developers. Use -Wno-dev to suppress it. > > -- Found PerlModules_JSON::PP: TRUE > -- Found PerlModules: TRUE found components: JSON::PP I'm going to guess that it wants things like find_package(PerlModules COMPONENTS JSON::PP) in a similar vein how the builtin FindICU and our FindHarfbuzz.cmake works.
Created attachment 393296 [details] Patch
This looks like it was added in: https://github.com/Kitware/CMake/commit/ee4673c1ae1e4a1aa4687412717567c2ffbb501b and there's a NAME_MISMATCHED argument to quiet the message. However, it seems like trying to call the function for each component is not the intended usage, so the patch seems like a better fix.
Thanks Konstantin. Sadly, I missed a few spots. Looks like FindHarfBuzz.cmake, FindSQLite3.cmake, FindATSPI.cmake, FindWPEBackend-fdo.cmake, FindOpenJPEG.cmake, and FindLibseccomp.cmake are all also affected. Sorry I didn't initially notice this: CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (PkgConfig) does not match the name of the calling package (HarfBuzz). 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/Modules/FindPkgConfig.cmake:45 (find_package_handle_standard_args) Source/cmake/FindHarfBuzz.cmake:68 (include) Source/cmake/OptionsGTK.cmake:27 (find_package) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (PkgConfig) does not match the name of the calling package (SQLite3). 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/Modules/FindPkgConfig.cmake:45 (find_package_handle_standard_args) Source/cmake/FindSQLite3.cmake:57 (include) Source/cmake/OptionsGTK.cmake:33 (find_package) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (PkgConfig) does not match the name of the calling package (ATSPI). 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/Modules/FindPkgConfig.cmake:45 (find_package_handle_standard_args) Source/cmake/FindATSPI.cmake:33 (include) Source/cmake/OptionsGTK.cmake:38 (find_package) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (WPEBACKEND_FDO) does not match the name of the calling package (WPEBackend-fdo). 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): Source/cmake/FindWPEBackend-fdo.cmake:47 (find_package_handle_standard_args) Source/cmake/OptionsGTK.cmake:221 (find_package) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (PkgConfig) does not match the name of the calling package (OpenJPEG). 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/Modules/FindPkgConfig.cmake:45 (find_package_handle_standard_args) Source/cmake/FindOpenJPEG.cmake:55 (include) Source/cmake/OptionsGTK.cmake:376 (find_package) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (LIBSECCOMP) does not match the name of the calling package (Libseccomp). 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): Source/cmake/FindLibseccomp.cmake:45 (find_package_handle_standard_args) Source/cmake/BubblewrapSandboxChecks.cmake:7 (find_package) Source/cmake/OptionsGTK.cmake:452 (include) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it.
Created attachment 393304 [details] Patch
Created attachment 393307 [details] Patch
Remaining warnings should be fixed similarly to Libseccomp patch (note that you either rename variables, or Find*.cmake files, or both - depends on which naming you prefer)
First two patches look OK. I'm not fond of changing all these variables to use lowercase naming, which is inconsistent with WebKit's CMake code style. We should adopt targets instead.
Comment on attachment 393296 [details] Patch Clearing flags on attachment: 393296 Committed r258358: <https://trac.webkit.org/changeset/258358>
Comment on attachment 393304 [details] Patch Clearing flags on attachment: 393304 Committed r258361: <https://trac.webkit.org/changeset/258361>
All reviewed patches have been landed. Closing bug.
(In reply to Michael Catanzaro from comment #10) > I'm not fond of changing all these variables to use lowercase naming, which > is inconsistent with WebKit's CMake code style. We should adopt targets > instead. It was a mistake of mine, FPHSA is totally fine with uppercase variables. However, some renames are still needed as there are packages where variables prefix mismatches package name. This affects WPEBackend-fdo and stuff in Source/ThirdParty/libwebrtc/cmake. (As for the latter, I think it's totally wrong that these files live in ThirdParty as they are WebKit-specific, and they should be moved to the same place with other Find-modules. But it's a separate thing)
Reopening to add new version of third patch
Created attachment 393423 [details] Patch
Created attachment 393425 [details] Patch
Comment on attachment 393425 [details] Patch Clearing flags on attachment: 393425 Committed r258412: <https://trac.webkit.org/changeset/258412>