mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 12:49:50 -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
14 lines
240 B
CMake
14 lines
240 B
CMake
set(CMAKE_FIND_REQUIRED ON)
|
|
find_path(PATH_doNotExists_Optional
|
|
NAMES doNotExists.h
|
|
OPTIONAL
|
|
)
|
|
find_path(PATH_doNotExists_OptionalRequired
|
|
NAMES doNotExists.h
|
|
OPTIONAL
|
|
REQUIRED
|
|
)
|
|
find_path(PATH_doNotExists
|
|
NAMES doNotExists.h
|
|
)
|