diff options
author | Brad King <brad.king@kitware.com> | 2020-08-07 14:30:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-08-07 14:47:25 (GMT) |
commit | 4c939b0d39c21b0a7f30ce64d82e87f75b8babec (patch) | |
tree | f6af2603ce152cc87e04e291d738d9c97a3a304a /Tests | |
parent | 39c6ac5112382093f99d2ee375162cdec57e4aec (diff) | |
download | CMake-4c939b0d39c21b0a7f30ce64d82e87f75b8babec.zip CMake-4c939b0d39c21b0a7f30ce64d82e87f75b8babec.tar.gz CMake-4c939b0d39c21b0a7f30ce64d82e87f75b8babec.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')
-rw-r--r-- | Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake index b77bb54..7b479f1 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) |