31e6571cca
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.
13 lines
319 B
CMake
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}'")
|