summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-08-10 14:45:48 +0000
committerKitware Robot <kwrobot@kitware.com>2020-08-10 10:45:54 -0400
commit72409ee089ee1c969bb11d36da9543a58b354321 (patch)
tree77ad2d78a0e15e743ba7c3c7d49b3dfdf89bf040
parent13e5df19fdeaf16ff51819caf322a426ecaf328c (diff)
parent8b12982653161773afbac1683cf4770d6d153b99 (diff)
downloadcmake-72409ee089ee1c969bb11d36da9543a58b354321.tar.gz
Merge topic 'test-FindPkgConfig-isolate-env' into release-3.18
8b12982653 Merge branch 'backport-test-FindPkgConfig-isolate-env' 4c939b0d39 Tests: Isolate RunCMake.FindPkgConfig from caller environment 20eeb40aaf Tests: Isolate RunCMake.FindPkgConfig from caller environment Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5108
-rw-r--r--Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
index dc7791513b..4e6eef6f00 100644
--- a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
@@ -1,5 +1,10 @@
include(RunCMake)
+# Isolate test cases from caller's environment.
+set(ENV{CMAKE_PREFIX_PATH} "")
+set(ENV{CMAKE_APPBUNDLE_PATH} "")
+set(ENV{CMAKE_FRAMEWORK_PATH} "")
+
run_cmake(PkgConfigDoesNotExist)
run_cmake(FindPkgConfig_NO_PKGCONFIG_PATH)