mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-25 16:09:42 -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
9 lines
257 B
CMake
9 lines
257 B
CMake
if (CMAKE_FIND_REQUIRED)
|
|
message(FATAL_ERROR "CMAKE_FIND_REQUIRED enabled in Config.cmake")
|
|
endif()
|
|
find_package(DoesNotExist)
|
|
find_library(library DoesNotExist)
|
|
find_program(program DoesNotExist)
|
|
find_path(path DoesNotExist)
|
|
find_file(file DoesNotExist)
|