diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-07-22 17:16:26 -0400 |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2019-07-22 17:17:02 -0400 |
commit | ff29c92df63ec9a9311b56537db285920c8faa30 (patch) | |
tree | ff7d1a7e4d27928b61f2e133669698de82bd24d6 | |
parent | 4cd039b78a955972a9c2b3947f267ce4b93489a0 (diff) | |
download | cmake-ff29c92df63ec9a9311b56537db285920c8faa30.tar.gz |
Tests: find_file restore PATH env variable after test runs
-rw-r--r-- | Tests/RunCMake/find_file/FromPrefixPath.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_file/FromPrefixPath.cmake b/Tests/RunCMake/find_file/FromPrefixPath.cmake index 1bf8409a39..63c6a07915 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}") |