summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FindPkgConfig
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-08-07 14:30:42 (GMT)
committerBrad King <brad.king@kitware.com>2020-08-07 14:37:28 (GMT)
commit20eeb40aafff830e15377697a3943a3a8a7edbd1 (patch)
tree213a7d946fee24bde5dfaebbe42755eae05e4e95 /Tests/RunCMake/FindPkgConfig
parent63a65baf4c343c73b2142078ef0045d3711dea1d (diff)
downloadCMake-20eeb40aafff830e15377697a3943a3a8a7edbd1.zip
CMake-20eeb40aafff830e15377697a3943a3a8a7edbd1.tar.gz
CMake-20eeb40aafff830e15377697a3943a3a8a7edbd1.tar.bz2
Tests: Isolate RunCMake.FindPkgConfig from caller environment
Avoid interference from `CMAKE_PREFIX_PATH` and friends if they happen to be set in the environment from which the tests are run.
Diffstat (limited to 'Tests/RunCMake/FindPkgConfig')
-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 dc77915..4e6eef6 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)