Skip to content
Snippets Groups Projects
Commit a2e9fe38 authored by Eugene Shalygin's avatar Eugene Shalygin Committed by Brad King
Browse files

find_package: Add variable to make package REQUIRED

Add a `CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>` variable is complement
to `CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` with just the opposite
behaviour: it turns non-required find_package call into the required one.

While optional package dependencies usually result in simple and clean
build logic, sometimes people want to be sure those optional
dependencies will be found and used. Examples are reproducible builds
and build instructions for 3rd parties. People choose to make
find_package calls REQUIRED and put them behind an option(). Such
workarounds blend build logic with build environment management and do
not look elegant.
parent d49b507b
No related branches found
No related tags found
Loading
Showing
with 99 additions and 6 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment