The ctest(1) command line allows repeating -L/-LE to form an AND
filter over test labels, but the ctest_test() and ctest_memcheck()
scripting commands accepted only a single INCLUDE_LABEL/EXCLUDE_LABEL
value, so a dashboard script could not express that filter.
The label-matching engine already stores the include/exclude
expressions as vectors and applies them with AND semantics; only the
command binding was single-value. Change both keywords to multi-value
(NonEmpty<vector<string>>) and hand the collected list straight to the
engine. ctest_memcheck() gains the same behavior for free, since it
inherits the option set.
Fixes : #27497
The TEST_INCLUDE_FILE(S) directory properties were written verbatim into
CTestTestfile.cmake, so a $<CONFIG>-parameterized include path could not
select a per-configuration script and failed at ctest time.
Evaluate generator expressions per include entry in
cmLocalGenerator::GenerateTestFiles():
* Entries without a generator expression are emitted unchanged.
* On single-config generators a genex entry is evaluated once and
emitted as one unconditional include.
* On multi-config generators it is evaluated for every configuration;
a config-independent result collapses to one unconditional include,
otherwise each non-empty per-config result is guarded by a
CTEST_CONFIGURATION_TYPE branch, mirroring add_test(). An entry that
evaluates to empty adds no include.
Promote cmScriptGenerator::CreateConfigTest to a public static helper so
the include guards reuse the exact add_test() config-test encoding; the
instance overloads now delegate to it. Evaluated results are quoted via
cmScriptGenerator::Quote, while plain entries keep their raw
serialization.
Fixes: #27941
Rapidhash is a better hash function than FNV-1a (also used in some stl
implementations): it is faster and has a reduced number of hash
collisions.
Closes: #27937
682db78943 Merge branch 'backport-test-depends-config' into test-depends-config
c31f09a1e6 CMAKE_TEST_BUILD_DEPENDS: Use config when evaluating test dependency targets
593c4ccaa6 CMAKE_TEST_BUILD_DEPENDS: Use config when evaluating test dependency targets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12306
The prior mechanism for reconciling cached diagnostic state with updates
from presets / command-line arguments based on whether the latter
modified diagnostics from their default state did not work. This is
because alterations that would not change the state relative to the
default were not recorded, even if they would alter the state relative
to the prior (cached) state.
The best fix for this is to apply alterations on top of the cached
state, rather than trying to determine whether an alteration is
important. Unfortunately, the only way to do this is to defer
alterations until after we can load the cache, which somewhat defeats
one of the original goals of reducing the number of mechanisms by which
alterations are recorded.
Modify how we handle diagnostic alterations to map them through a helper
function, which either defers them (in Project mode) or acts as a
pass-through (applying the changes immediately, in all other modes).
While this does, as noted, introduce another means of storing
diagnostics, this new storage effectively consists of a list of deferred
function calls, rather than a unique format for recording changes, which
is what we had prior to the Great Refactor.
Save original input value of CMAKE_TOOLCHAIN_FILE also before
normalization or relative searching to avoid reconfiguring because the
full path doesn't match the input. Tests correct behavior avoiding
reconfigures and ensuring reconfigure on toolchain change from preset.
Fixes: #24942
When finding BoringSSL, LibreSSL, or AWS-LC, version information may be
unavailable. Amend commit 54686cae64 (Utilities: Require OpenSSL >=
3.0.0 at configure time, 2026-06-26) by using the checks from upstream
curl to only error if we're using OpenSSL proper.
Fixes: #27978
As of commit ed48feeae8 (clang-cl: Add support for C++ modules,
2026-03-27, v4.4.0-rc1~428^2) CMake tries to support modules for
clang-cl, which can mostly be accomplished, except for the ClangCl VS
toolset, where the /scanDependencies flag is not yet supported.
Amend commit 3022f0363f (VS: set ScanSourceForModuleDependencies at
vcxproj level, 2024-04-27, v3.28.5~3^2) to only emit this setting when
scanning is supported by the toolchain.
Fixes: #27957
Issue: #27977