Tests: Cover find_program when the environment duplicate some HINTS

Reported-by: Marc CHEVRIER <marc.chevrier@sap.com>
This commit is contained in:
Brad King 2015-09-14 14:49:49 -04:00
parent 401229759c
commit 7a6e5f06e7
5 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1 @@
#!/bin/sh

View File

@ -0,0 +1 @@
#!/bin/sh

View File

@ -0,0 +1 @@
-- PROG='[^']*/Tests/RunCMake/find_program/A/testAandB'

View File

@ -0,0 +1,8 @@
set(ENV_PATH "$ENV{PATH}")
set(ENV{PATH} ${CMAKE_CURRENT_SOURCE_DIR}/A)
find_program(PROG
NAMES testAandB
HINTS ${CMAKE_CURRENT_SOURCE_DIR}/A ${CMAKE_CURRENT_SOURCE_DIR}/B
)
message(STATUS "PROG='${PROG}'")
set(ENV{PATH} "${ENV_PATH}")

View File

@ -1,5 +1,6 @@
include(RunCMake)
run_cmake(EnvAndHints)
run_cmake(DirsPerName)
run_cmake(NamesPerDir)