diff options
Diffstat (limited to 'Tests/RunCMake/find_path')
-rw-r--r-- | Tests/RunCMake/find_path/FromPATHEnv-stderr.txt | 27 | ||||
-rw-r--r-- | Tests/RunCMake/find_path/FromPATHEnv.cmake | 12 |
2 files changed, 39 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_path/FromPATHEnv-stderr.txt b/Tests/RunCMake/find_path/FromPATHEnv-stderr.txt new file mode 100644 index 0000000..088efd5 --- /dev/null +++ b/Tests/RunCMake/find_path/FromPATHEnv-stderr.txt @@ -0,0 +1,27 @@ + find_path called with the following settings:.* + VAR: PATH_IN_ENV_PATH + NAMES: \"PrefixInPATH\.h\" + Documentation.* + Framework.* + AppBundle.* + CMAKE_FIND_USE_CMAKE_PATH: 1 + CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1 + CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 0 + CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1 + + find_path considered the following locations:.* + The item was not found.* + find_path called with the following settings:.* + VAR: PATH_IN_ENV_PATH + NAMES: \"PrefixInPATH\.h\" + Documentation.* + Framework.* + AppBundle.* + CMAKE_FIND_USE_CMAKE_PATH: 1 + CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1 + CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1 + CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1 + + find_path considered the following locations:.* + The item was found at.* +.*include/PrefixInPATH.* diff --git a/Tests/RunCMake/find_path/FromPATHEnv.cmake b/Tests/RunCMake/find_path/FromPATHEnv.cmake index af13d09..535e624 100644 --- a/Tests/RunCMake/find_path/FromPATHEnv.cmake +++ b/Tests/RunCMake/find_path/FromPATHEnv.cmake @@ -1,4 +1,16 @@ set(ENV_PATH "$ENV{PATH}") + +set(CMAKE_FIND_DEBUG_MODE 1) +set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH OFF) + +set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}/include") +find_path(PATH_IN_ENV_PATH NAMES PrefixInPATH.h) + +set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH ON) +find_path(PATH_IN_ENV_PATH NAMES PrefixInPATH.h) + +set(CMAKE_FIND_DEBUG_MODE 0) + foreach(path "/does_not_exist" "/include" "") unset(PATH_IN_ENV_PATH CACHE) set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}${path}") |