99318e49b9 Help: Mention when diagnostics were added
daec98ba61 Diagnostics: Fix passing diagnostic state to try_compile
e0b0ac4295 Diagnostics: Overhaul warnings in cmake-gui
ca5d569524 Diagnostics: Switch state to new system
618c074a8c Diagnostics: Use categories for presets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11855
Since commit baa33acbda (AIX-GNU: Put implicit link directories in
runtime libpath, 2013-02-14, v2.8.11~184^2~1) we explicitly add the GNU
compiler driver's builtin RPATH entries. Extend commit f08dcbffec
(Property: Add INSTALL_REMOVE_ENVIRONMENT_RPATH property, 2019-07-12,
v3.16.0-rc1~350^2~1) to exclude them.
Fixes: #27738
Commit 03f19aa4ea (cmSystemTools: Fix path traversal vulnerability in
archive extraction, 2026-01-06, v4.3.0-rc1~179^2) incidentally
introduced the `ARCHIVE_EXTRACT_SECURE_SYMLINKS` flag when extracting
archives, which prevents extraction of objects whose location would be
altered by a symlink on disk. However, this particular behavior change
was never documented or tested alongside the other changes in the
commit (absolute paths and path traversal components).
Divergent behavior of this flag from `libarchive` on Windows and
non-Windows platforms needs further investigation. In particular, on
Windows, archives cannot be extracted through directory symlinks, but
can be extracted through junctions. On Linux, archives *can* still be
extracted through symlinks, and archives containing symlinks can be
extracted as well.
The symlink change breaks compatibility with many common use cases of
existing projects, e.g., when extracting an archive inside a symlinked
build directory. Revert the flag until this issue can be explored in a
future version of CMake.
Fixes: #27752
Reported-by: scivision <scivision@users.noreply.github.com>
"Compression format unsupported" errors of this form can only possibly
come from `file(ARCHIVE_CREATE)`, so we don't need to track the line
number of the called function. Reduce the need to update these numbers
every time the test helper script is updated.
Do not propagate deprecated diagnostic variables to try_compile.
Instead, if any diagnostic is ignored in the calling instance, also
ignore it in the try_compile instance.
Replace the old (and poorly designed) mechanisms for altering warnings
in cmake-gui with a new warning tree that adaptively handles all
diagnostic categories that are defined.
Add an additional state to the cmake instance to track diagnostics. Use
this to initialize any new/reset states we create so that other contexts
will inherit the diagnostic state from presets / command-line options.
Modify the front-end to map presets and -W command-line options to
manipulation of this new diagnostic state. Remove old members for
storing diagnostic state. Rework how diagnostic state is persisted.
Deprecate old, non-standard spellings for manipulating diagnostics.
Deprecate old 'dev' spelling for CMD_AUTHOR.
Note that this is a work in progress. Messaging has not yet been
updated, so the new state is not yet being used to control diagnostics,
and some of the logic to update the old state has been stripped (and
will eventually be removed entirely). Backward compatibility support for
the deprecated CMAKE_{WARN,ERROR}_DEPRECATED variables is only partially
implemented. The GUI's interface for manipulating warnings is partially
broken and needs to be overhauled. These tasks are being done in
separate commits in order to minimize review burden and keep the changes
per commit / per merge request more manageable.
427cf86cb8 cmCMakePresetsGraph: better name for a local variable of `PrintPresets`
0f3347bb27 cmCMakePresetsGraph: generalize printing presets of different types
9638624ebe cmCMakePresetsGraph: move the static `PrintPresets` out of class
f60a1270bc cmCMakePresetsGraph: move static members to private scope
0bf8df384c cmCMakePresetsGraph: use `std::setw` instead of for-loop + one space at time
43a18bfaee cmCMakePresetsGraph: simplify presets printing
9aa7036093 cmCMakePresetsGraph: `printPrecedingNewline()` no need to be a member
37853f25b7 cmCMakePresetsGraph: `class` -> `typename` in template declarations
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11822
This was missed in commit ee83165923 (cmake: Explicitly normalize
input paths as they exist on disk, 2024-10-17, v4.0.0-rc1~597^2),
causing `CMAKE_CURRENT_LIST_FILE` in `cmake -P` scripts to be
regressed by the KWSys behavior change merged by commit e9bd437a43
(Merge branch 'upstream-KWSys' into normalize-input-paths,
2024-10-24, v4.0.0-rc1~589^2~1).
Issue: #27750