summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/find_file
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-07-22 21:16:26 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2019-07-22 21:17:02 (GMT)
commitff29c92df63ec9a9311b56537db285920c8faa30 (patch)
treeff7d1a7e4d27928b61f2e133669698de82bd24d6 /Tests/RunCMake/find_file
parent4cd039b78a955972a9c2b3947f267ce4b93489a0 (diff)
downloadCMake-ff29c92df63ec9a9311b56537db285920c8faa30.zip
CMake-ff29c92df63ec9a9311b56537db285920c8faa30.tar.gz
CMake-ff29c92df63ec9a9311b56537db285920c8faa30.tar.bz2
Tests: find_file restore PATH env variable after test runs
Diffstat (limited to 'Tests/RunCMake/find_file')
-rw-r--r--Tests/RunCMake/find_file/FromPrefixPath.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_file/FromPrefixPath.cmake b/Tests/RunCMake/find_file/FromPrefixPath.cmake
index 1bf8409..63c6a07 100644
--- a/Tests/RunCMake/find_file/FromPrefixPath.cmake
+++ b/Tests/RunCMake/find_file/FromPrefixPath.cmake
@@ -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}")