mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-27 00:49:52 -06:00
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
14 lines
219 B
CMake
14 lines
219 B
CMake
set(CMAKE_FIND_REQUIRED ON)
|
|
find_program(PROG_AandB_Optional
|
|
NAMES testAandB
|
|
OPTIONAL
|
|
)
|
|
find_program(PROG_AandB_OptionalRequired
|
|
NAMES testAandB
|
|
OPTIONAL
|
|
REQUIRED
|
|
)
|
|
find_program(PROG_AandB
|
|
NAMES testAandB
|
|
)
|