From 20eeb40aafff830e15377697a3943a3a8a7edbd1 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 7 Aug 2020 10:30:42 -0400 Subject: 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. --- Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v0.12 From 4c939b0d39c21b0a7f30ce64d82e87f75b8babec Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 7 Aug 2020 10:30:42 -0400 Subject: 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. --- Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v0.12