CMake/Tests/RunCMake/find_program/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
200 B
CMake

find_program(PROG_A
NAMES testA
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A
NO_DEFAULT_PATH
REQUIRED
)
message(STATUS "PROG_A='${PROG_A}'")
find_program(PROG_AandB
NAMES testAandB
REQUIRED
)