diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-06-12 20:04:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-06-21 15:06:39 (GMT) |
commit | 02f527c66a6f9f0fa0d3fd4a816ea2bd9e3ba35f (patch) | |
tree | 91222ea7bb0386155dd7a4f673bf1164918ed5ea /Tests/RunCMake/find_program/EnvAndHints.cmake | |
parent | f0a89149bc569020e281c5908733bf4b7eeddf15 (diff) | |
download | CMake-02f527c66a6f9f0fa0d3fd4a816ea2bd9e3ba35f.zip CMake-02f527c66a6f9f0fa0d3fd4a816ea2bd9e3ba35f.tar.gz CMake-02f527c66a6f9f0fa0d3fd4a816ea2bd9e3ba35f.tar.bz2 |
Find: Provide global controls for the `NO_[]_PATH` call options
Diffstat (limited to 'Tests/RunCMake/find_program/EnvAndHints.cmake')
-rw-r--r-- | Tests/RunCMake/find_program/EnvAndHints.cmake | 23 |
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}") |