Commit Graph

405 Commits

Author SHA1 Message Date
Marc Chevrier 5c1521c54d FindPython: enforce artifacts consistency when cross-compiling
Fixes: #26696
2025-03-05 17:11:56 +01:00
Brad King b3da9c6d60 GenEx: Evaluate LINK_LIBRARIES target properties transitively
The `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` target properties
establish the graph of link dependencies used to propagate usage
requirements transitively.  Therefore the `$<TARGET_PROPERTY:...>`
generator expression should evaluate them transitively as it does for
other transitive properties.  Add policy CMP0189 for compatibility.

Fixes: #26709
Issue: #12435
2025-02-24 11:43:47 -05:00
Brad King 2123244746 FindGCCXML: Add policy to remove this module
GCC-XML has been superseded by CastXML for a long time.

Closes: #26687
2025-02-17 11:35:25 -05:00
Evan Wilde 321c647640 Include source file without an extension after the same name with an extension
CMP0115 requires that source files listed in CMake must include their
file extension, but there are cases when projects have different source
files with the same name, but one with an extension and one without.
In the current state, CMake will ignore the file without the extension
an always map it to the file with an extension.

```cmake
add_library(foo bar.c bar)
```

In the above example, the target `foo` will only recognize and depend on
`bar.c` and miss the file `bar` unless `bar` comes before `bar.c` in the
source list.
This issue also affects how custom commands emit files.

This change adds a new policy to recognize files with and without a file
extension as different files, both when building targets, and when they
are being created.

Fixes: #26058
2025-02-14 10:01:10 -05:00
Nikita Nemkin 5d039f3be3 regex: Match ^ at most once in repeated searches
When doing successive matches, track the input start and current search
start positions separately to prevent the `^` anchor from matching in
the middle of the string.  Add policy CMP0186 to provide compatibility.

Issue: #26629
Fixes: #16899
2025-02-13 20:00:02 +05:00
Brad King d65f522a50 Merge topic 'FindRuby-compat-vars'
2d86cf314f FindRuby: Drop upper-case RUBY_ results in favor of Ruby_ variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10273
2025-02-02 07:03:10 -05:00
Brad King 2d86cf314f FindRuby: Drop upper-case RUBY_ results in favor of Ruby_ variables
Add policy CMP0185 for compatibility.

Fixes: #26640
2025-02-01 07:12:30 -05:00
Nikita Nemkin 51e4d81f16 Help: Remove accidental blockquotes around lists
Indenting a list relative to the previous paragraph creates
a blockquote. Combined with the natural list indent it results
in an overly large left margin.
2025-01-31 12:23:29 -05:00
Nikita Nemkin 718043b540 Help: Convert some literal blocks into tables and lists
Also, ensure that header-less tables have a top border in cmake.css.
2025-01-31 12:23:29 -05:00
Brad King 3e64c6a56e Merge topic 'msvc-runtime-checks'
2b2344b412 MSVC: Add abstraction for runtime checks
49dcd1ce5d Help: Fix MSVC_DEBUG_INFORMATION_FORMAT description of example
2f8e643d9d CMP0141: Fix documentation copied from CMP0091

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !10214
2025-01-30 08:48:01 -05:00
Nikita Nemkin 9890cfc4ec Help: More syntax highlighting for literal blocks
Covers almost all blocks containing actual code, except:

* Parsed-literal blocks can't be highlighted, including many command
  summaries and substitution-heavy docs like find_... commands.
  This is a Sphinx limitation.

* Code with errors, like CMP0049, DEPLOYMENT_ADDITIONAL_FILES,
  DEPLOYMENT_REMOTE_DIRECTORY, @PACKAGE_INIT@ substitution in the
  tutorial, bracket arguments/comments in cmake-language.7 and
  cmake-developer.7.

* FindQt4 module, which needs reformatting.
2025-01-29 16:48:53 -05:00
AJIOB 2b2344b412 MSVC: Add abstraction for runtime checks
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
2025-01-29 13:07:41 -05:00
Brad King d6a7a83700 Merge topic 'fix-typos-found-by-pygrep-hooks'
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
2025-01-28 08:35:19 -05:00
Alex Turbov d2752135cb codespell: Fix typos found by version 2.4 2025-01-27 10:55:58 -05:00
Alex Turbov bc4c71627a Help: Fix typos found by the rst-backticks hook
The corresponding `pre-commit` configuration is coming in the
separate MR.

Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2025-01-27 01:43:26 +04:00
AJIOB 2f8e643d9d CMP0141: Fix documentation copied from CMP0091 2025-01-24 11:48:56 -05:00
Brad King fb1bd1d330 CMP0065: Remove support for OLD behavior 2025-01-22 10:40:55 -05:00
Brad King d9dd38cccf CMP0064: Remove support for OLD behavior 2025-01-22 10:40:55 -05:00
Brad King ac1a9cb160 CMP0063: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King 36fffb673a CMP0062: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King 789a7d73d4 CMP0061: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King 3dc19e24cb CMP0060: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King 1393fbf13f CMP0059: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King 8f9f01b24d CMP0058: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
Brad King c283aafe62 CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
Brad King cbe7fc4b81 CMP0056: Remove support for OLD behavior 2025-01-21 09:44:05 -05:00
Brad King cfcb36ca34 CMP0055: Remove support for OLD behavior 2025-01-21 09:44:05 -05:00
Brad King 90d814f024 CMP0054: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
Brad King 1150fae89a CMP0053: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
Brad King f0b1ca4d70 CMP0052: Remove support for OLD behavior 2025-01-20 09:46:54 -05:00
Brad King e4fddc8e37 CMP0051: Remove support for OLD behavior 2025-01-20 09:46:54 -05:00
Brad King 6973f8304e CMP0050: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King 9f6011e307 CMP0049: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King 292048874f CMP0048: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King 05b2c563bb CMP0047: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King d9498a474e CMP0046: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King 1e8a744f07 CMP0045: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King 9094eaa778 CMP0044: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
Brad King ed99370f63 CMP0043: Remove support for OLD behavior
Note that per-source `COMPILE_DEFINITIONS_<CONFIG>` are not covered by
the policy, and are still supported.
2025-01-19 09:41:02 -05:00
Brad King 9b148ed1ac CMP0042: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
Brad King 7193c2d23d CMP0041: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
Brad King cddac8736d CMP0040: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
Brad King 0b6412b514 CMP0039: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
Brad King af28f030d8 CMP0038: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
Brad King 84f737545f CMP0037: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
Brad King 850174c507 CMP0036: Remove support for OLD build_name command 2025-01-19 09:41:01 -05:00
Brad King 5b255fe7da CMP0035: Remove support for OLD variable_requires command 2025-01-19 09:41:01 -05:00
Brad King 84c3943873 CMP0034: Remove support for OLD utility_source command 2025-01-19 09:41:01 -05:00
Brad King 76702e36e3 CMP0033: Remove support for OLD export_library_dependencies command 2025-01-19 09:41:00 -05:00
Brad King ff6d55f8c5 CMP0032: Remove support for OLD output_required_files command 2025-01-19 09:41:00 -05:00