summaryrefslogtreecommitdiffstats
path: root/Tests/EnforceConfig.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/EnforceConfig.cmake.in')
-rw-r--r--Tests/EnforceConfig.cmake.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/EnforceConfig.cmake.in b/Tests/EnforceConfig.cmake.in
index 8c0817c..f84d180 100644
--- a/Tests/EnforceConfig.cmake.in
+++ b/Tests/EnforceConfig.cmake.in
@@ -23,4 +23,10 @@ if(NOT CTEST_CONFIGURATION_TYPE)
message("Guessing configuration ${CTEST_CONFIGURATION_TYPE}")
endif()
+# Isolate tests from user configuration in the environment.
+unset(ENV{CMAKE_GENERATOR})
+unset(ENV{CMAKE_GENERATOR_INSTANCE})
+unset(ENV{CMAKE_GENERATOR_PLATFORM})
+unset(ENV{CMAKE_GENERATOR_TOOLSET})
+
@TEST_HOME_ENV_CODE@