6 Commits
Author SHA1 Message Date
Matthew Woehlke 763cfbcac8 Diagnostics: "Fix" policy warnings in modules
Introduce a mechanism (via the private and undocumented `ISSUE_WARNING`
option to the `cmake_policy` command) to allow built-in modules to issue
policy warnings. Update modules to use this.

This allows modules to issue policy warnings with the `CMD_POLICY`
diagnostic type, which is consistent with internally issued diagnostics.
This also tends to simplify the logic for issuing such warnings in much
the way the helpers introduced in the previous commit did for the C++
code.
2026-05-20 15:32:57 -04:00
Matthew Woehlke 92e0ca9046 Diagnostics: Show author message for all descendants
Tweak `cmMessenger` to also show the "warning is for project developers"
notice for all diagnostics that are descendants of the `CMD_AUTHOR`
category. When doing so, also show both command-line options which can
suppress the message.
2026-05-15 09:57:23 -04:00
Matthew Woehlke b0f9852990 Diagnostics: Update tests (automated)
Update expected test output to account for the new format of diagnostic
messages. These changes were applied entirely by `sed` using the
following commands:

  - `/Use -Wno-dev to suppress/s/-Wno-dev/-Wno-author/g`
  - `s/Warning [\\][(]dev[\\][)]/Warning \\(author\\)/g`
  - `s/CMake Deprecation Warning/CMake Warning \\(deprecated\\)/g`

This is not a complete fix, but covers a significant fraction of the
needed changes, and this commit is strictly automated changes.
2026-04-16 15:10:35 -04:00
Brad King 8a7657cf87 Add deprecation warnings for policies CMP0151 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for policies
introduced in CMake 3.27 and below to encourage projects to port
away from setting policies to OLD.
2025-12-19 07:22:50 -05:00
Eisuke Kawashima db7c04dfb2 Test(git): set commit.gpgsign to false
If a user has run `git config --global commit.gpgsign true`,
git-related tests fail since the test users do not exist and gpg cannot
sign.
2025-06-22 01:45:19 +09:00
Chris WrightandCraig Scott 550f63447d ExternalProject/FetchContent: Support relative remote URLs
Teach `ExternalProject_Add` and `FetchContent_Declare` to resolve
relative remote URLs provided via `GIT_REPOSITORY`.  Add policy
CMP0150 to maintain compatibility.

Fixes: #24211
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2023-04-26 16:30:36 +08:00