Add CMAKE_REQUIRE_FIND_PACKAGE_<PackageName> variable
We currently have the variable
CMAKE_DISABLE_FIND_PACKAGE_<PackageName> that disabled every (optional)
I think it would be interesting to also introduce a
This would logically transform every
CMAKE_REQUIRE_FIND_PACKAGE_XXX should be an error.
This variable would be interesting to make sure that a dependency is found (and used). Right now, a lot of cmake scripts are very flexible in that they optionally enable features when finding some dependency. This requires the packager checking the configure logs and/or running tests to check whether a feature is actually enabled.
CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>, you have greater assurance that when the configure step succeeded,
that the dependency has been found. (You should still test though)