regression: 3.22 FindMPI nuisance warning
This is newly present in CMake 3.22.0-rc{1,2}. MPI is found and works, but nuisance warning is emitted.
cmake_minimum_required(VERSION 3.14)
project(gen LANGUAGES C)
find_package(MPI)
emits warning on Windows, Linux, etc. with Ninja or GNU Make like:
-- The C compiler identification is GNU 8.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning (dev) at cmake-3.22.0-rc2-linux-x86_64/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (PkgConfig)
does not match the name of the calling package (MPI). 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-3.22.0-rc2-linux-x86_64/share/cmake-3.22/Modules/FindPkgConfig.cmake:88 (find_package_handle_standard_args)
cmake-3.22.0-rc2-linux-x86_64/share/cmake-3.22/Modules/FindMPI.cmake:270 (include)
CMakeLists.txt:5 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.