diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2018-01-25 19:04:12 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2018-01-26 14:27:22 (GMT) |
commit | 74092d92bffa26b0e17da638dabcbc462c3f407a (patch) | |
tree | f12f7c866e358a25094acd17c41d11e9e75804bd /Tests/RunCMake/ctest_start/RunCMakeTest.cmake | |
parent | 7c30a3a3c321575ee8f3bd82b9e617456c2a7396 (diff) | |
download | CMake-74092d92bffa26b0e17da638dabcbc462c3f407a.zip CMake-74092d92bffa26b0e17da638dabcbc462c3f407a.tar.gz CMake-74092d92bffa26b0e17da638dabcbc462c3f407a.tar.bz2 |
cmCTestScriptHandler: Add new field ShouldRunCurrentScript
This is to avoid scope issues with CTEST_RUN_CURRENT_SCRIPT. If
ctest_start() is called within a function scope, the value of
CTEST_RUN_CURRENT_SCRIPT that it sets doesn't make it to the global
scope. With this change, ctest_start() no longer sets
CTEST_RUN_CURRENT_SCRIPT, and instead sets a field directly in
cmCTestScriptHandler. The old behavior of CTEST_RUN_CURRENT_SCRIPT
has also been kept for projects and tests that rely on setting it.
Diffstat (limited to 'Tests/RunCMake/ctest_start/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/ctest_start/RunCMakeTest.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake index d630a79..bf47256 100644 --- a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake @@ -11,6 +11,8 @@ run_ctest_start(StartQuiet Experimental QUIET) run_ctest_start(ConfigInSource Experimental) +run_ctest_start(FunctionScope Experimental QUIET) + function(run_ConfigInBuild) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ConfigInBuild-build) set(RunCMake_TEST_NO_CLEAN 1) |