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.
Revert commit cf2ad9995a (GetPrerequisites: Ignore relative paths
printed by ldd, 2023-02-20, v3.27.0-rc1~459^2) because it regressed
existing use cases. We will need to find another solution to the use
case motivating the change.
Fixes: #25372
On x86 Linux, the ldd output for its vDSO (linux-gate.so.1) is a bit
different from other Linux with standard vDSO name (linux-vdso.so.1).
$ ldd /bin/ls
linux-gate.so.1 => linux-gate.so.1 (0xf7f5e000)
libcap.so.2 => /usr/lib32/libcap.so.2 (0xf7f22000)
libc.so.6 => /usr/lib32/libc.so.6 (0xf7cfb000)
/lib/ld-linux.so.2 => /usr/lib32/ld-linux.so.2 (0xf7f60000)
This fixes the `Tests/BundleUtilities` test on x86 Linux.
The `item` variable was the loop variable in the old code prior to
commit 3dfc8b9bd6 (GetPrerequisites: use if(IN_LIST) instead of foreach,
2019-05-09). The function argument `value` should be used instead.
Prior to commit v3.4.0-rc1~264^2~1 (GetPrerequisites: Add error checks
for execute_process() calls, 2015-07-29), `get_prerequisites` would
simply warn on a missing binary and not update the result list at all.
That commit accidentally made the case an error. This was fixed by
commit v3.8.0-rc1~110^2 (GetPrerequisites: Do not fail on files we
cannot find, 2017-01-10), but the fix also cleared the result list.
Clearing the list is incorrect because it is supposed to be able to
accumulate results over multiple calls.
Remove the list clearing behavior to restore the original behavior on a
missing binary.
Fixes: #17306
I encountered an issue where not all prerequisites would be listed by
`get_prerequisites` since some of the prerequisites cannot be resolved
and are added to the list of unseen prerequisites. This has the side
effect of clearing the list of `prerequisites_var` and thus removes some
prerequisites from the list. Fix it.
Historically we have always warned and skipped missing files. Since
commit v3.4.0-rc1~264^2~1 (GetPrerequisites: Add error checks for
execute_process() calls, 2015-07-29) we fail instead, but this was not
an intentional part of that change. Restore the warn-only behavior so
that missing system libraries (e.g. during cross-compiling) do not cause
failure.
Closes: #16523
With some Windows toolchains we use `objdump` which does not mention
delay load dependencies in its output. Therefore, to get consistent
behavior we should always ignore them.
Use the `dumpbin` message "Image has the following delay load
dependencies" that precedes the delay load dependencies to recognize and
skip them. Fortunately, this message is not translated to the current
locale (at least on "Windows 7 French", "Windows 10 French" and "Windows
Server 2008 R2 French").
Fixes: #16241
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool. Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience. Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.
Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices. It also references version control
history for more precise information. Therefore we no longer need to spell
out the list of Contributors in each source file notice.
Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing". The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.
Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically. Manually fix up shebang lines and trailing
newlines in a few files. Manually update the notices in a few files that the
script does not handle.
The matching expression added by commit v3.5.0-rc1~33^2
(GetPrerequisites: Define api-ms-win-* files as system libraries,
2016-01-19) did not account for absolute paths to the UCRT libraries.
We already recognize absolute paths to the MSVC runtime libraries.
Do this for UCRT libraries too.
Issue: #16240
Since commit v3.6.0-rc1~287^2 (GetPrerequisites: Fix
gp_resolved_file_type on non-canonical paths, 2016-03-08) we
accidentally convert relative paths (e.g. system dll file names) to
absolute paths even when we do not know the base directory. Fix this by
canonicalizing only paths that are already absolute.
Closes: #16240
When using `grep` to filter the output, add the `-a` flag to tell
it never to treat the output as binary. Otherwise when LANG != C
in the environment the non-ascii text may break the filter.
Extend the optimization from commit v3.4.0-rc1~264^2 (GetPrerequisites:
Optionally filter "objdump" output for speed, 2015-07-29) to work
on Windows by using `findstr` in place of `grep`.
The `VS*COMNTOOLS` environment variables specify locations of VS tools
and are set during the VS installation. Use them in addition to the
hard-coded default install locations.
Canonicalize the input paths so we treat them both consistently,
in particular when comparing them via string operations. This
is needed for calls like
fixup_bundle("${CMAKE_INSTALL_PREFIX}/../test" ...)
Suggested-by: Benjamin Ballet <bballet@ivsweb.com>