CMAKE_REQUIRE_FIND_PACKAGE_PackageName.rst 551 B

1234567891011121314
  1. CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>
  2. ----------------------------------------
  3. .. versionadded:: 3.22
  4. Variable for making :command:`find_package` call ``REQUIRED``.
  5. Every non-``REQUIRED`` :command:`find_package` call in a project can be
  6. turned into ``REQUIRED`` by setting the variable
  7. ``CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>`` to ``TRUE``.
  8. This can be used to assert assumptions about build environment and to
  9. ensure the build will fail early if they do not hold.
  10. See also the :variable:`CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` variable.