mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 04:09:33 -05:00
857a039d66
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
5 lines
175 B
CMake
5 lines
175 B
CMake
set(CMAKE_FIND_REQUIRED ON)
|
|
find_package(DoesNotExist-Optional OPTIONAL CompA CompB CompC)
|
|
find_package(DoesNotExist)
|
|
message(FATAL_ERROR "This error must not be reachable.")
|