diff options
author | Robert Goulet <robert.goulet.qc@gmail.com> | 2019-12-28 05:20:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-15 20:02:56 (GMT) |
commit | 4153d8445bf107f2637ceaca63804f4668fb9305 (patch) | |
tree | a9c7afeb571f8017a2cbb86e2234dfc7fd5b8b5f /Source | |
parent | 93526fd91319d952e60760c735a9bb191bc4ede3 (diff) | |
download | CMake-4153d8445bf107f2637ceaca63804f4668fb9305.zip CMake-4153d8445bf107f2637ceaca63804f4668fb9305.tar.gz CMake-4153d8445bf107f2637ceaca63804f4668fb9305.tar.bz2 |
Add CMAKE_CTEST_ARGUMENTS variable to pass command-line arguments to ctest
Fixes: #20172
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 4cbcda0..7686def 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); |