
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.
13 lines
200 B
CMake
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
|
|
)
|