summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-17 14:39:51 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-17 14:40:23 (GMT)
commitcd6f6b2a9f62564127a055cf8160404141fe2259 (patch)
tree5254036f761153408f96ad186bb0fc0c5bb89277 /Source
parent796d66438bce2a46235642767d0614c158723738 (diff)
parent4153d8445bf107f2637ceaca63804f4668fb9305 (diff)
downloadCMake-cd6f6b2a9f62564127a055cf8160404141fe2259.zip
CMake-cd6f6b2a9f62564127a055cf8160404141fe2259.tar.gz
CMake-cd6f6b2a9f62564127a055cf8160404141fe2259.tar.bz2
Merge topic 'cmake-ctest-arguments'
4153d8445b Add CMAKE_CTEST_ARGUMENTS variable to pass command-line arguments to ctest Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4168
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index c3ab4b7..b3eb8e4 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2458,6 +2458,13 @@ void cmGlobalGenerator::AddGlobalTarget_Test(
cmCustomCommandLine singleLine;
singleLine.push_back(cmSystemTools::GetCTestCommand());
singleLine.push_back("--force-new-ctest-process");
+ if (auto testArgs = mf->GetDefinition("CMAKE_CTEST_ARGUMENTS")) {
+ std::vector<std::string> args;
+ cmExpandList(testArgs, args);
+ for (auto const& arg : args) {
+ singleLine.push_back(arg);
+ }
+ }
if (cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.') {
singleLine.push_back("-C");
singleLine.push_back(cmakeCfgIntDir);