From b150e8757c17a060ae442266a2e61d8cb2d21252 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 3 Nov 2026 11:48:20 +0100 Subject: [PATCH] ctest: Restore handling of -U and --union with no value Refactoring in commit c0c4d48ba2 (cmCTest: Use cmCommandLineArgument command-line parsing infrastructure, 2024-10-12, v4.0.0-rc1~646^2) accidentally made `-U` and `--union` require an argument, but the documentation states that no argument is required. Closes: #28243 --- Source/cmCTest.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index ed1516f9a1..b1d8de5e9c 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2445,8 +2445,8 @@ int cmCTest::Run(std::vector const& args) CommandArgument{ "-I", CommandArgument::Values::One, dashI }, CommandArgument{ "--tests-information", CommandArgument::Values::One, dashI }, - CommandArgument{ "-U", CommandArgument::Values::One, dashU }, - CommandArgument{ "--union", CommandArgument::Values::One, dashU }, + CommandArgument{ "-U", CommandArgument::Values::Zero, dashU }, + CommandArgument{ "--union", CommandArgument::Values::Zero, dashU }, CommandArgument{ "-R", CommandArgument::Values::One, dashR }, CommandArgument{ "--tests-regex", CommandArgument::Values::One, dashR }, CommandArgument{ "-E", CommandArgument::Values::One, dashE },