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
This commit is contained in:
Brad King
2020-08-10 14:45:48 +00:00
committed by Kitware Robot
@@ -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)