diff options
Diffstat (limited to 'Tests/RunCMake/find_library/FromPATHEnv.cmake')
-rw-r--r-- | Tests/RunCMake/find_library/FromPATHEnv.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_library/FromPATHEnv.cmake b/Tests/RunCMake/find_library/FromPATHEnv.cmake index fec041d..c24e640 100644 --- a/Tests/RunCMake/find_library/FromPATHEnv.cmake +++ b/Tests/RunCMake/find_library/FromPATHEnv.cmake @@ -4,6 +4,19 @@ set(ENV_PATH "$ENV{PATH}") file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lib/libcreated.a" "created") +set(CMAKE_FIND_DEBUG_MODE 1) +set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH OFF) + +set(ENV{PATH} "${CMAKE_CURRENT_BINARY_DIR}/lib") +find_library(CREATED_LIBRARY NAMES created created_no_exist) + +set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH ON) + +set(ENV{PATH} "${CMAKE_CURRENT_BINARY_DIR}/lib") +find_library(CREATED_LIBRARY NAMES created) +set(CMAKE_FIND_DEBUG_MODE 0) + + foreach(path "/does_not_exist" "/lib" "") unset(CREATED_LIBRARY CACHE) set(ENV{PATH} "${CMAKE_CURRENT_BINARY_DIR}${path}") |