CMake/Tests/RunCMake/find_file/Required.cmake
Sylvain Joubert dc00809596 find_*: Add support for REQUIRED keyword
In the same spirit as the REQUIRED keyword on find_package, this will
stop cmake execution with an error on a failed find_program, find_file,
find_path or find_library.
2020-03-06 16:40:26 +01:00

13 lines
234 B
CMake

find_file(FILE_exists
NAMES PrefixInPATH.h
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
NO_DEFAULT_PATH
REQUIRED
)
message(STATUS "FILE_exists='${FILE_exists}'")
find_file(FILE_doNotExists
NAMES doNotExists.h
REQUIRED
)