summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestStartCommand.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2018-01-25 19:04:12 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2018-01-26 14:27:22 (GMT)
commit74092d92bffa26b0e17da638dabcbc462c3f407a (patch)
treef12f7c866e358a25094acd17c41d11e9e75804bd /Source/CTest/cmCTestStartCommand.cxx
parent7c30a3a3c321575ee8f3bd82b9e617456c2a7396 (diff)
downloadCMake-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 'Source/CTest/cmCTestStartCommand.cxx')
-rw-r--r--Source/CTest/cmCTestStartCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index 4f0d87b..38ee623 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -126,7 +126,7 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
return false;
}
- this->Makefile->AddDefinition("CTEST_RUN_CURRENT_SCRIPT", "OFF");
+ this->CTest->SetRunCurrentScript(false);
this->CTest->SetSuppressUpdatingCTestConfiguration(true);
int model = this->CTest->GetTestModelFromString(smodel);
this->CTest->SetTestModel(model);