summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-08-07 10:51:28 -0400
committerBrad King <brad.king@kitware.com>2020-08-07 10:51:28 -0400
commit0ccdcd630bcd42a8d7b40b27c8c7cd314400b51b (patch)
treef6af2603ce152cc87e04e291d738d9c97a3a304a
parent39c6ac5112382093f99d2ee375162cdec57e4aec (diff)
parent4c939b0d39c21b0a7f30ce64d82e87f75b8babec (diff)
downloadcmake-0ccdcd630bcd42a8d7b40b27c8c7cd314400b51b.tar.gz
Merge branch 'backport-test-FindPkgConfig-isolate-env' into release-3.16
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 b77bb54324..7b479f1dbd 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(FindPkgConfig_NO_PKGCONFIG_PATH)
run_cmake(FindPkgConfig_PKGCONFIG_PATH)
run_cmake(FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH)