mirror of
https://github.com/reactos/CMake.git
synced 2025-02-26 06:55:34 +00:00

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
291 B
CMake
13 lines
291 B
CMake
find_program(PROG
|
|
NAMES testB testA
|
|
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
|
|
NO_DEFAULT_PATH
|
|
)
|
|
message(STATUS "PROG_ABS='${PROG_ABS}'")
|