
This adds a `CMAKE_FIND_REQUIRED` variable which causes `find_package`, `find_path`, `find_file`, `find_library` and `find_program` to be considered `REQUIRED` by default. It also introduces an `OPTIONAL` keyword to those commands, allowing them to ignore the value of this variable. Issue: #26576
4 lines
197 B
CMake
4 lines
197 B
CMake
set(CMAKE_FIND_REQUIRED ON CACHE BOOL "") # The cache entry must be shadowed by a nested definition.
|
|
set(RequiredVarNested_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
find_package(RequiredVarNested CONFIG)
|