You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
975 B
30 lines
975 B
5 years ago
|
set(ENV_PATH "$ENV{PATH}")
|
||
|
set(ENV{PATH} "")
|
||
|
foreach(path "/does_not_exist" "/PackageRoot" "")
|
||
|
unset(Resolved_FOUND CACHE)
|
||
|
set(Resolved_DIR "")
|
||
|
set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}${path}")
|
||
|
find_package(Resolved QUIET)
|
||
|
message(STATUS "Resolved_FOUND='${Resolved_FOUND}'")
|
||
|
endforeach()
|
||
|
|
||
|
set(CMAKE_FIND_USE_CMAKE_PATH OFF)
|
||
|
set(CMAKE_PREFIX_PATH )
|
||
|
foreach(path "/does_not_exist" "/PackageRoot" "")
|
||
|
unset(Resolved_FOUND CACHE)
|
||
|
set(Resolved_DIR "")
|
||
|
set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}${path}")
|
||
|
find_package(Resolved QUIET)
|
||
|
message(STATUS "Resolved_FOUND='${Resolved_FOUND}'")
|
||
|
endforeach()
|
||
|
|
||
|
set(CMAKE_FIND_USE_CMAKE_PATH ON)
|
||
|
foreach(path "/does_not_exist" "/PackageRoot" "")
|
||
|
unset(Resolved_FOUND CACHE)
|
||
|
set(Resolved_DIR "")
|
||
|
set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}${path}")
|
||
|
find_package(Resolved NO_CMAKE_PATH QUIET)
|
||
|
message(STATUS "Resolved_FOUND='${Resolved_FOUND}'")
|
||
|
endforeach()
|
||
|
set(ENV{PATH} "${ENV_PATH}")
|