CMake/Tests/RunCMake/find_program/NamesPerDir.cmake
Brad King 31e6571cca find_program: Fix regression in finding an already-known path
Changes in commit v3.4.0-rc1~124^2~1 (cmFindProgramCommand: Re-implement
search using more flexible approach, 2015-09-01) did not preserve the
behavior of looking for the given name with no search path at all.
Fix this and add a test case covering finding an absolute path with
no search directories.
2015-10-30 07:40:46 -04:00

13 lines
319 B
CMake

find_program(PROG
NAMES testB testA NAMES_PER_DIR
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A ${CMAKE_CURRENT_SOURCE_DIR}/B
NO_DEFAULT_PATH
)
message(STATUS "PROG='${PROG}'")
find_program(PROG_ABS
NAMES ${CMAKE_CURRENT_SOURCE_DIR}/A/testA NAMES_PER_DIR
NO_DEFAULT_PATH
)
message(STATUS "PROG_ABS='${PROG_ABS}'")