diff options
author | Brad King <brad.king@kitware.com> | 2020-01-17 14:39:51 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-01-17 14:40:23 (GMT) |
commit | cd6f6b2a9f62564127a055cf8160404141fe2259 (patch) | |
tree | 5254036f761153408f96ad186bb0fc0c5bb89277 /Source | |
parent | 796d66438bce2a46235642767d0614c158723738 (diff) | |
parent | 4153d8445bf107f2637ceaca63804f4668fb9305 (diff) | |
download | CMake-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.cxx | 7 |
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); |