summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/find_program/EnvAndHints.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/find_program/EnvAndHints.cmake')
-rw-r--r--Tests/RunCMake/find_program/EnvAndHints.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_program/EnvAndHints.cmake b/Tests/RunCMake/find_program/EnvAndHints.cmake
index 14ebd6e..0f12eff 100644
--- a/Tests/RunCMake/find_program/EnvAndHints.cmake
+++ b/Tests/RunCMake/find_program/EnvAndHints.cmake
@@ -1,8 +1,31 @@
+
set(ENV_PATH "$ENV{PATH}")
set(ENV{PATH} ${CMAKE_CURRENT_SOURCE_DIR}/A)
find_program(PROG
NAMES testAandB
+ )
+message(STATUS "PROG='${PROG}'")
+unset(PROG CACHE)
+
+set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH OFF)
+find_program(PROG
+ NAMES testAandB
+ )
+message(STATUS "PROG='${PROG}'")
+unset(PROG CACHE)
+
+find_program(PROG
+ NAMES testAandB
+ HINTS ${CMAKE_CURRENT_SOURCE_DIR}/B ${CMAKE_CURRENT_SOURCE_DIR}/A
+ )
+message(STATUS "PROG='${PROG}'")
+unset(PROG CACHE)
+set(ENV{PATH} "${ENV_PATH}")
+
+find_program(PROG
+ NAMES testAandB
HINTS ${CMAKE_CURRENT_SOURCE_DIR}/A ${CMAKE_CURRENT_SOURCE_DIR}/B
)
message(STATUS "PROG='${PROG}'")
+unset(PROG CACHE)
set(ENV{PATH} "${ENV_PATH}")