11ee18b758 ci: extend msvc_v71_nmake `RunCMake.PrecompileHeaders` test timeout
1c91fadbe8 Tests/RunCMake/PrecompileHeaders: support extended timeout
42f2867b3b pchreuse: defer dependency addition until generation time
f9bc615d9a pchreuse: ban PCH reuse from targets which disable PCH
f78f592b78 pchreuse: defer target existence enforcement to generation time
3ef773490d pchreuse: defer PCH consistency checks to generation time
1d701491a2 pchreuse: always ask the PCH reuse target for PDB information
6e7da8aa95 cmGeneratorTarget: factor out reuse target computation
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: alcroito <alexandru.croitor@qt.io>
Acked-by: Vincent X <gulackeg@gmail.com>
Merge-request: !10887
Add the ability to modify the environment of the various steps running
as part of an external project build. This specifically adds the ability
to set them on the configure , build , install, and test steps, as well
as exposing the `ENVIRONMENT_MODIFICATION` keyword arguments to
`ExternalProject_Add_Step`, allowing customization of the environment of
custom steps.
The values of the environment variable respect the `LIST_SEPARATOR`.
Fixes: #26963
Note that this does lose the backtrace information. It also, however,
makes `PRECOMPILE_HEADERS_REUSE_FROM` a non-magic property now.
Previously, appending to the property would miss all of its behaviors
(or leave existing setup in-place which is no longer relevant
post-append). Rather than making a policy to block appending, just defer
all logic to generation time.
Now that generation can work with any way the state gets to the way it
is, just do the target enforcement at generation time. This allows PCH
reuse targets to be declared before or after targets which use them.
Also update `cmLocalGenerator` to use the methods now that they reliably
provide values rather than parallel construction.
The property settings set things up once, but nothing ensures that
post-reuse hookup that any property changes propagate. Instead, when
computing PDB information, if PCH reuse is enabled, just always use its
values.
Also drop enforcement at generate time of property value consistency as
it is now ignored when PCH reuse is in effect.
Additionally, if a target is PCH-reused, generate a PDB output directory
for it.
The `PchReuseFromIgnoreOwnProps` test failed previously because the
post-reuse link update of the consuming `PDB` properties are no longer
considered. The `PchReuseFromUseUpdatedProps` failed because the
post-reuse link did not update the copy of the properties added to
consuming reuse target properties.
The implementation of (pre|post)Build hooks rely on a direct parent-
child relationship between the build system process and `ctest
--start-instrumentation`. MSYS2's `make.exe` uses the msys-runtime POSIX
compatibility layer which disrupts this relationship.
* Use `uv_disable_stdio_inheritance` to resolve the deadlock between the
parent build system process and `ctest
--wait-and-collect-instrumentation` on Windows.
* Remove Windows gating from preBuild and postBuild indexing and update
tests and documentation accordingly.
Fixes: #26668
a760a74abf Tests: Optionally skip tests requiring 64-bit time_t
14e21fa992 bootstrap: Compile with 64-bit time_t on 32-bit Linux if possible
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10951
This commit allows to override a global or target-wide 'job pool'
property on a per-source basis.
It modifies the Ninja generator to first look into the source's
properties, and only use the target properties as a fallback.
The new `source` parameter to
`cmNinjaTargetGenerator::addPoolNinjaVariable` may be null, e.g. when
the function is called in context where there is no source (e.g. a
linking task).
Closes: #23994
Previously, the `cmExportCommand` parser did not use `cmSubcommandTable`
to distinguish between its `TARGETS`, `EXPORT`, `SETUP`, and `PACKAGE`
modes. This created a maintenance burden when updating or adding
functionality.
Refactor the parser to use a subcommand for each keyword. This new
structure mirrors the design of `cmInstallCommand` and simplifies future
development.
Update experimental UUID for instrumentation after commit afa94bae1e
(instrumentation: Rename queries field to options, 2025-07-08) broke compatibility
for old queries.
Adds new `cdashSubmit` and `cdashVerbose` options to allow enabling
instrumentation in CDash submissions using query files or the
`cmake_instrumentation` command.
Fixes: #26783, #26727
This implements a limited exception mechanism for find_package() via
the UNWIND_INCLUDE keyword.
When package discovery via find_package(UNWIND_INCLUDE) fails the
StateSnapshot is updated to an UNWINDING state. In this state further
calls to find_package() and include() are forbidden. While in the
UNWINDING state, the include() command immediately calls
SetReturnInvoked() whenever it is reached.
The UNWINDING state is reset when a parent call to find_package() is
reached.
Fixes: #26897
This will allow JSON schemas for these two types of files to describe the
version-specific content without requiring any outside information.
Fixes: #27031
088b0af2f9 GoogleTest: Fix naming of tests with named parameters
3f780c3fde GoogleTest: Set DEF_SOURCE_LINE on tests if file and line are known
1cdceae8e3 GoogleTest: Parse discovered test list from JSON output if supported
07d14c21a9 GoogleTest: Add tests for NO_PRETTY_VALUES and NO_PRETTY_TYPES
54bb974b27 GoogleTest: Add tests for named parameters
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dennis Lambe <malsyned_kitware@malsyned.net>
Merge-request: !10739
Recent changes to the JSON and stdout parsers changed the current test
names from an unintentional bug to an intentional compatibility hack.
This commit removes that compatibility hack and makes tests with named
parameters follow the same naming conventions as tests with numbered
parameters.
Fixes: #26939
The --gtest_output=json option is supported from gtest 1.8.1 onwards.
Earlier versions output a warning about it being an unrecognized option,
and builds that #define GTEST_HAS_FILE_SYSTEM 0 output an error about it
being unsupported, but in both cases still continue outputting the same
plain text output as before and return an exit code of 0.
We now add that option and check for whether the JSON file is generated,
falling back to parsing the plain text output as before if it isn't or
if the environment variable NO_GTEST_JSON_OUTPUT is set.
The fake executor binaries are sensitive to parameter order. This commit
adds --gtest_output:json arguments to a number of tests added for the
new JSON parser. The argument order has been adjusted for the
invocations of those binaries.
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
Co-Authored-By: Dennis Lambe Jr. <malsyned@malsyned.net>
Commit 58d9950842 (CPS: Fix empty configuration field on noconfig
builds, 2025-06-30) fixed an issue with CPS generation that would
incorrectly use the empty string to identify the configuration in some
instances. (The expected CMake behavior is that an empty configuration
is always equivalent to 'noconfig'.) However, that commit did not add
any tests for the fix.
Add those tests now. Also, tweak the tests that were added, that test
for expected non-empty configuration-specific content, to hard-code what
configuration or configurations are produced. Lastly, remove the
explicit test for existence of the CPS file in said tests; `file(READ)`
will complain if the file does not exist, so the separate test is
superfluous.