Files
cmake/Tests/RunCMake/CTestCommandLine/Passthrough-empty-stdout.txt
Mickaël Germain b3980bf703 ctest: Add support for forwarding arguments to tests via --
Add support for `ctest [options] -- <args>` to forward extra arguments
to every executed test's command line. Arguments after `--` are appended
after each test's own arguments in the order given.

This enables passing options to test frameworks like Google Test or
doctest without needing per-test ARGS properties:

    ctest -R my_test -- --gtest_filter=SomeTest.Case
    ctest --verbose -- --success

An error is raised if `--` is combined with `--build-and-test`, `-S`,
or `-D`/`-T`/`-M` modes, which have their own argument forwarding.
A bare `--` with no following arguments is silently ignored.

Fixes: #20470
2026-03-13 16:21:02 -07:00

7 lines
104 B
Plaintext

1: Test command: [^
]* "-E" "echo" "base_output"
.*
2: Test command: [^
]* "-E" "echo" "second_test"
.*