The file API code used unsigned long to hold the major version in most
places, but not all. Some places used unsigned int, and an important one
of those is the cmFileApi::BuildVersion() function. As a result, it has never
been safe for a large value not representable by an unsigned int to be
used in these variables.
Convert all of the file API version number variables and function arguments
to use unsigned int consistently. This avoids any size mismatch warnings
when passing values around. They also don't need to be unsigned long,
as we never expect version numbers to be anything even close to what
an unsigned int cannot represent.
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>
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 2f3a7814cf53af23809b2dcec1dbe5eed45cfb43 (master).
Upstream Shortlog
-----------------
Daniel Pfeifer (5):
fd4c4235 Reference test executables by target name
0725a089 SystemInformation: Remove redundant attempt to use OSVERSIONINFO
136db938 SystemInformation: Remove unused variable bIsWindows64Bit
41d44dbe SystemInformation: Rewrite OSRelease and OSVersion on Windows
7d0a468c TestsCxx: Add an application manifest for Windows
da73f6b058 Help: Add cxxModuleBmi details missing from file API and release notes
bef17abc09 Help: Add file API fileSet... fields missed in the 3.23 release notes
094436db98 Help: The fileSets item in a codemodel target object is optional
1398ef18c2 Help: Add missing backtrace property to compileCommandFragments
74d70d13cd Help: Fix repeated word in file API docs for sourceFileExtensions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10913
da73f6b058 Help: Add cxxModuleBmi details missing from file API and release notes
bef17abc09 Help: Add file API fileSet... fields missed in the 3.23 release notes
094436db98 Help: The fileSets item in a codemodel target object is optional
1398ef18c2 Help: Add missing backtrace property to compileCommandFragments
74d70d13cd Help: Fix repeated word in file API docs for sourceFileExtensions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10913
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.
8071304f2e Configure CMake itself with policies through CMake 4.0
f7380d8c4a export: Increase maximum policy version in exported files to 4.0
94ff184a63 Add deprecation warnings for policies CMP0143 and below
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10925