blob: 0ed8a12e38b85f3bd1837ff9fe2f537a77ce0e89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
set(ENV_PATH "$ENV{PATH}")
set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}/PackageRoot")
find_package(Resolved QUIET)
foreach(path "/does_not_exist" "/PackageRoot" "")
unset(ResolvedA_FOUND CACHE)
set(ResolvedA_DIR "")
set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}${path}")
find_package(ResolvedA QUIET)
message(STATUS "Resolved_FOUND='${ResolvedA_FOUND}'")
endforeach()
set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH OFF)
foreach(path "/does_not_exist" "/PackageRoot" "")
unset(Resolved_FOUND CACHE)
set(Resolved_DIR "")
set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}${path}")
find_package(ResolvedB QUIET)
message(STATUS "Resolved_FOUND='${ResolvedB_FOUND}'")
endforeach()
set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH ON)
foreach(path "/does_not_exist" "/PackageRoot" "")
unset(Resolved_FOUND CACHE)
set(Resolved_DIR "")
set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}${path}")
find_package(ResolvedC NO_SYSTEM_ENVIRONMENT_PATH QUIET)
message(STATUS "Resolved_FOUND='${ResolvedC_FOUND}'")
endforeach()
set(ENV{PATH} "${ENV_PATH}")
|