Update cmPackageInfoReader's version parsing to more fully conform to
the specification and to reject non-conforming version strings. Start
adding framework to support version schemas other than "simple". Fix how
cmFindPackageCommand extracts version parts to not fail if more than
four parts are present.
b902fbd0c6 execute_process: Clarify when a Windows command interpreter is used
e388ed687a execute_process: Improve invocation of .cmd/.bat with spaces
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nikita Nemkin <nikita@nemkin.ru>
Acked-by: Alexey Edelev <alexey.edelev@qt.io>
Merge-request: !10321
b902fbd0c6 execute_process: Clarify when a Windows command interpreter is used
e388ed687a execute_process: Improve invocation of .cmd/.bat with spaces
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nikita Nemkin <nikita@nemkin.ru>
Acked-by: Alexey Edelev <alexey.edelev@qt.io>
Merge-request: !10321
Modify cmPackageInfoReader to not require schema_version in supplemental
files (i.e. appendices and/or configuration-specific files). This is
important as our own generation is not including cps_version in
supplemental files, and it is forbidden in the same according to a
strict reading of the specification.
Extend the fix from commit 74c9d40876 (execute_process: Fix invocation
of .cmd/.bat with spaces, 2025-01-31) to work without relying on
conversion to a "short path", which may not exist. Instead, extending
the `cmd /c` wrapper to `cmd /c call` seems to support spaces directly.
Suggested-by: Alexandru Croitor <alexandru.croitor@qt.io>
Fixes: #26655
f8db82ba81 Configure CMake itself with policies through CMake 3.31
34652be5d2 export: Increase maximum policy version in exported files to 3.31
5cd2669146 Add deprecation warnings for policies CMP0142 and below
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10296
The logic to extract the version of a CPS file into the location used to
record files that were considered but rejected was happening too late,
resulting in rejected files unnecessarily reporting their version as
"unknown". Fix this by filling the variable sooner.
314440c320 instrumentation: Run preBuild and postBuild hooks before and after make
6598248da7 instrumentation: Avoid busy-wait on postBuild hook
f8339cb944 instrumentation: Enable tests on more Makefile generators
0fbb927bdd instrumentation: Disable preBuild and postBuild hooks on Windows
a13be1301f Tests/RunCMake/Instrumentation: Improve quoting and escaping in CMake code
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10295
Refactor common logic out of individual RunCMake/find_package-CPS tests.
Move enabling the experimental gate to the RunCMakeTest.cmake, add a
separate test to verify the experimental warning, and suppress it
everywhere else. This will greatly simplify writing non-failure tests.
The set of RunCMake/find_package tests is quite large, which makes
development and management less efficient. While this could probably
stand additional refactoring, split out just the CPS tests for now, as
those are currently under active development.
The OLD behaviors of all policies are deprecated, but only by
documentation. Add an explicit deprecation diagnostic for policies
introduced in CMake 3.25 and below to encourage projects to port
away from setting policies to OLD.
Corruption happens when a multiline help string starts with
a newline. This causes an overflow in substr() and the whole,
unescaped help string is written to the cache file.
Multiline strings are escaped line by line. The fix is to start
searching for line break points from position 1. A break point
at zero, which triggers the overflow, could only produce
a redundant empty line.
Fixes: #9098
The `CreateProcessW` documentation states "to run a batch file, you must
start the command interpreter". Use `cmd /c the.bat` to run batch files.
Also, use a "short path" to the `.bat` file if needed to avoid spaces.
Previously this worked in some cases only due to undocumented behavior
of `CreateProcessW` when given a `.bat` file.
Fixes: #26655
Implement finding components of CPS packages. Specifically, reject any
candidate packages that don't provide all required components, and
ignore appendices that don't provide requested (required or optional)
components. This applies to both top-level searches and also searching
for package dependencies.
Fix find_package to set an error message when trying to find
dependencies of a CPS package fails. This fixes the command previously
reporting "find_package unknown error" for such failures.
* remove support of size computation based on "magic" enum element because
Oracle SunPro compilers crash on it.
* enhance handling of enum_set with explicit size.
Replace our hard-coded default for `/RTC1` with a first-class
abstraction to select runtime checks from an enumeration of logical
names. Add a `MSVC_RUNTIME_CHECKS` target property and corresponding
`CMAKE_MSVC_RUNTIME_CHECKS` variable.
Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose
runtime checks under the old behavior. Add policy CMP0184 to
provide compatibility.
Fixes: #26614
4e6a13f211 Use lower case style for commands
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !10245
Previously we didn't properly exclude $<COMPILE_ONLY:OBJECT lib>
from the right hand side of `target_link_libraries`.
Fix the update that commit 73337cb383 (LINK_LIBRARIES: Evaluate
separately for linking and usage requirements, 2022-03-22,
v3.24.0-rc1~404^2~2) made to `AddObjectEntries`.
Fixes: #26642
`find_package(CURL CONFIG)` provides `CURL_VERSION` from the upstream
cmake package version file.
Upstream curl commit `699ac9430c` (cmake: publish/check supported
protocols/features via `CURLConfig.cmake`, 2024-12-29) extends the
upstream cmake package to provide our old `CURL_VERSION_STRING`.
Provide both names from CMake's own module to aid transition.
Fixes: #26634
bc4c71627a Help: Fix typos found by the `rst-backticks` hook
c833629508 Help: Fix typos found by the `rst-directive-colons` hook
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10237
b83c5b2c83 pre-commit: Add `pygrep-hooks` repo and 3 hooks to check RST files
abe46bf9e1 pre-commit: Add the `clang-format` hook
8f4dd0558e pre-commit: Add the `typos` hook for extra spellchecking
54eba3a42a pre-commit: Add the `codespell` hook
244e3d314c pre-commit: Add the `sphinx-lint` hook
efa7c6aedf pre-commit: Add a hook to check whitespaces and conflict markers
2c06b9f429 pre-commit: Add a hook to fix missed EOL at the end of files
1861948755 pre-commit: Add a hook to check JSON files
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10143
Revise commit fc7aa3cd69 (tests: Preserve empty arguments in test
command lines, 2024-09-30, v3.31.0-rc1~33^2) to delay variable expansion
until code evaluation. Otherwise we may parse the working directory
path as CMake language code.
CMake now provides the CMAKE_<LANG>_LINK_MODE variable which specify how
the link step is done. So, the CMAKE_<LANG>_USING_LINKER_MODE variable
is no longer needed.
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Issue: #26123
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`. Use `clang-format` version 18.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Fixes: #26123
77f71ad4e2 Remove compatibility with CMake versions older than 3.5
fb1bd1d330 CMP0065: Remove support for OLD behavior
d9dd38cccf CMP0064: Remove support for OLD behavior
d88047c329 Remove compatibility with CMake versions older than 3.3
ac1a9cb160 CMP0063: Remove support for OLD behavior
36fffb673a CMP0062: Remove support for OLD behavior
789a7d73d4 CMP0061: Remove support for OLD behavior
3dc19e24cb CMP0060: Remove support for OLD behavior
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10210
c3777c1536 ci: Extend spellcheck job with 'typos' tool
d11552c2d9 codespell: Exclude paths by patterns following pre-commit check conventions
11d0a631d4 codespell: Split multi-valued configuration across multiple lines
54dfadaf5a ci: Rename "codespell" job to more general name "spellcheck"
17fc94e5e3 ci: Add typos 1.29.4 to Fedora base image
ddf8220572 ci: Use Fedora 41 default flang package now that it is new enough
1e2d19ea4f gitignore: Tell tools honoring .gitignore to ignore .git too
0d0a94bcfb Tests: Fix Fortran syntax for initialized variable
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10211
This compatibility has been deprecated since commit 3a4791548d
(Deprecate compatibility with CMake versions older than 3.5, 2023-02-09,
v3.27.0-rc1~508^2). The behavior itself has been deprecated
since CMake 3.5.
Issue: #26613
This compatibility has been deprecated since commit 3a4791548d
(Deprecate compatibility with CMake versions older than 3.5, 2023-02-09,
v3.27.0-rc1~508^2). The behavior itself has been deprecated
since CMake 3.3.
Issue: #26613
This compatibility has been deprecated since commit 3a4791548d
(Deprecate compatibility with CMake versions older than 3.5, 2023-02-09,
v3.27.0-rc1~508^2). The behavior itself has been deprecated
since CMake 3.2.
Issue: #26613
381c446ff7 VS: Remove support for appending a platform to the generator name
dc24d88062 Remove compatibility with CMake versions older than 3.1
90d814f024 CMP0054: Remove support for OLD behavior
292aaffb78 Source: Remove unused cmCommandArgument{Lexer,Parser}
1150fae89a CMP0053: Remove support for OLD behavior
f0b1ca4d70 CMP0052: Remove support for OLD behavior
e4fddc8e37 CMP0051: Remove support for OLD behavior
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10205
This compatibility has been deprecated since commit 3a4791548d
(Deprecate compatibility with CMake versions older than 3.5, 2023-02-09,
v3.27.0-rc1~508^2). The behavior itself has been deprecated
since CMake 3.1.
Issue: #26613
The Xlib interface to the Xpresent extension was missing from the FindX11 module, so I put it in. The xcb interface is already present.
Xpresent project page: https://gitlab.freedesktop.org/xorg/lib/libxpresent
This compatibility has been deprecated since commit 3a4791548d
(Deprecate compatibility with CMake versions older than 3.5, 2023-02-09,
v3.27.0-rc1~508^2). The behavior itself has been deprecated
since CMake 3.0.
Issue: #26613
This compatibility has been deprecated since commit 5845c218d7
(Deprecate compatibility with CMake versions older than 2.8.12,
2020-06-12, v3.19.0-rc1~629^2). The behavior itself has been
deprecated since CMake 2.8.12.
Issue: #26613
785523a136 Remove compatibility with CMake versions older than 2.8.0
35282387ea CMP0014: Remove support for OLD behavior
fad9c55b8b CMP0013: Remove support for OLD behavior
98a59ba8ad CMP0012: Remove support for OLD behavior
3c0dbb66f5 CMP0011: Remove support for OLD behavior
cf832e75bc CMP0010: Remove support for OLD behavior
77f8c374f3 CMP0009: Remove support for OLD behavior
43ef139567 CMP0008: Remove support for OLD behavior
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10188
9d34069ca8 instrumentation: Add targetLabels field to link snippets
32444714e5 instrumentation: Update tests so that snippet verification runs
11bcf2efb8 instrumentation: Correct example v1 Data snippet in manual
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Roscoe A. Bartlett <rabartl@sandia.gov>
Merge-request: !10185
a438a0460a ArgumentParserTypes: implement a workaround for EDG 6 assertion failure
d3edb67134 Tests: disable some tests on Alt Linux due to rpm config
68d730bcff Tests: switch off some RunCMake tests for broken libc on e2k
488de6294a CPack: correctly perform querytags on old versions of RPM
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10174
This compatibility has been deprecated since commit 5845c218d7
(Deprecate compatibility with CMake versions older than 2.8.12,
2020-06-12, v3.19.0-rc1~629^2). The behavior itself has been
deprecated since CMake 2.8.0.
Issue: #26613
5f523333be SymlinkTrees: Test building in one directory when CWD is a symlink to it
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10180
On Alt Linux, some tests that rely on debuginfo and/or rpm
config (using buildroot related binary `brp-alt`), can not succeed.
They produce errors like "package do not have URL as expected",
"source_package-buildroot: No such file or directory", and
"non-stripped binaries don't contain .debug sections".
These tests are disabled by this commit in case of `brp-alt` found.
Some old OS Elbrus installations (e.g. 6.0.1) have libc that
tends to behave incorrectly in some rare cases. This prevents
some tests from being run correctly:
- RunCMake.Graphviz, test no_module_libs
- RunCMake.Syntax, test EscapeCharsDisallowed
These tests are now not run in case of such libc.
b010a1fb1d Help: Update try_compile list of automatic policies
5e9b40b6a5 Help: Update cmake-buildsystem(7) TARGET_POLICY example to a newer policy
9ffbc0e628 Tests/RunCMake/cmake_minimum_required: Generalize deprecated version case name
0eca249ac7 Tests/RunCMake: Update more cmake_minimum_required versions to 3.10
a8cf033a74 Tests/RunCMake/return: Use newer cmake_minimum_required VERSION
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10178
Account for changes to upstream ninja:
* commit `5d93f2da28` (Add exit code to the failed target, 2024-12-03)
* commit `311bf93416` (Propagate jobs' exit codes to the ninja's exit code,
2024-12-03)
Add a test verifying that the project build tree specified with -B is not
converted to symlinked path when configured from a symlink to the provided build
tree.
d620d77d26 FindDoxygen: Rename `_Doxygen_dne_header` -> `_Doxygen_do_not_edit_header`
e7ff3cccea PushToAndroidDevice.cmake: Rename `cmake_parse_arguments` prefix
bc8621d999 Fix: A lot of typos in code found by `typos`
b33beb7af5 Help: Fix some typos found by `sphinx-lint`
78e45c2db6 Style: Replace TABs with spaces for indentation in some files
74e0173f66 Tests(NuGet): Fix the test to ignore empty and space-only lines
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10151
Implement finding dependencies of CPS packages. This is done by setting
up additional `cmFindPackageCommand` instances which are used to look
for a parent package's dependencies.