Tests: find_file restore PATH env variable after test runs

This commit is contained in:
Robert Maynard 2019-07-22 17:16:26 -04:00
parent 4cd039b78a
commit ff29c92df6

View File

@ -1,3 +1,4 @@
set(ENV_PATH "$ENV{PATH}")
set(ENV{PATH} "")
foreach(path "/does_not_exist" "/include" "")
unset(PrefixInPATH_File CACHE)
@ -15,3 +16,4 @@ foreach(path "/does_not_exist" "/include" "")
message(STATUS "PrefixInPATH_File='${PrefixInPATH_File}'")
endforeach()
set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH ON)
set(ENV{PATH} "${ENV_PATH}")