These checks want to know if named target properties are builtin, which
is now known by checking the Help/prop_tgt directory. (Previously the
check could be confused by a define_property call in the project.)
Install the Help directory next to Modules to make it available in CMake
distributions. Use cmRST to read Help .rst documents and print them as
help output.
Add options
--help-manual-list
--help-manual
to list available manuals or print one of them. Implement the options
--help-commands
--help-modules
--help-policies
--help-properties
--help-variables
by mapping to the corresponding manual page. Implement the options
--help-command-list
--help-module-list
--help-policy-list
--help-property-list
--help-variable-list
by globbing the available Help .rst documents of the corresponding type
and reading their titles. Implement the options
--help-command
--help-module
--help-policy
--help-property
--help-variable
by globbing the matching Help .rst document(s) and printing them.
Create a cmRST class to perform just enough reStructuredText processing
to support display of Help documents in human-readable text format.
This will be used to implement --help-* command-line options.
Support directives "include", "replace", "parsed-literal", "toctree"
(Sphinx), and "cmake-module" (CMake Sphinx Extension to scan .cmake
modules). Support inline CMake Sphinx Domain roles to convert
cross-references to corresponding title text. Support inline
substitutions defined by the "replace" directive, but keep it simple by
requiring replacements to be defined before use.
Add a CMakeLib "testRST" case to cover processing of supported
constructs and compare results against expected output.
As reported by Coverity Scan, if the configured file contains a #include,
Untrusted array index read
The array index could be controlled by an attacker, leading to reads outside
the bounds of the array.
In main: Read from array at index computed using an unscrutinized value from
an untrusted source (CWE-129)
CID 1081283 (#1 of 1): Untrusted array index read (TAINTED_SCALAR)
25. tainted_data: Using tainted variable "testToRun" as an index into an array
"cmakeGeneratedFunctionMapEntries".
We will no longer support full documentation generation from executables
and will instead generate documentation with other tools. Disable (with
a warning left behind) the command-line options:
--copyright
--help-compatcommands
--help-full
--help-html
--help-man
Drop supporting code. Drop manual sections generation from executables.
Remove internal documentation construction APIs. Drop unused sections
See Also, Author, Copyright, Compat Commands, Custom Modules.
Add a top-level document holding the Sphinx root toctree. List all
reference manuals from Help/manual/*.rst and the Sphinx-generated
general index (genindex) and search pages.
Create a convert-help.bash script to extract builtin documentation as
reStructuredText sources in a new Help directory. Run each executable
with the --help-full option targeting a .rst file to extract the
documentation. Generate Sphinx "toctree" directives to point each man
page at the corresponding documents it should contain. Organize
cmake-commands(7), cmake-properties(7), and cmake-variables(7) man pages
into sections similar to those generated by --help-properties and
--help-variables output previously.
Run "cmake --help-full cmake.1.rst" by hand on Windows and OS X.
Copy the generator/*.rst documents for generators unique to those
platforms into Help/generator.
Temporarily add a RST formatter to convert builtin documentation to .rst
source files. This will be removed shortly after we use it to convert
documentation.
Teach the RST formatter to:
* Output preformatted blocks as reStructuredText "::" literal blocks.
* Output option lists as bullet lists with option names enclosed in
reStructuredText ``literal`` quoting.
* Output individual documentation objects (commands, variables, etc.)
in separate .rst files organized in directories by type.
Replace references to cmVersion::GetCMakeVersion() in builtin
documentation with the literal placeholder "|release|" that will be
defined as a substitution later.
With our modern development workflow it is less likely a property will
be added to C++ code without documentation. This mode only existed to
support the DocTest which had very limited coverage of the properties
anyway.
Drop the 'documentation' build target. We will no longer use the
executables to generate their own documentation. New infrastructure
will be introduced later to generate documentation.
Factor the CMAKE_DATA_DIR, CMAKE_DOC_DIR, and CMAKE_MAN_DIR selection
out of CMakeLists.txt and into a Source/CMakeInstallDestinations.cmake
script. Load the script from the original location of the code.
Cache the destination values as empty strings so we know if the user
sets them explicitly. If not, then compute defaults based on the
platform and full CMake version string. By not caching the versioned
defaults, we can change them in a single build tree as the version
changes.
Remove duplication of the install destination defaults from the
bootstrap script. Cache empty defaults there too. Parse from the CMake
code the default values to report in the help output. Keep the CMake
code in a structured format to make this reliable.
Move logic to compute CMake_VERSION out of the top-level CMakeLists.txt
file to a dedicated Source/CMakeVersionCompute.cmake module and include
it from the original location. This will allow it to be re-used.
a4263c9 export(): Handle multiple dependent export sets.
66b290e export(): Process the export() command at generate time.
5fe5c32 export(): Set a Makefile on the cmExportBuildFileGenerator.
e383555 cmExportInstallFileGenerator: Fix comment to match reality.
This allows the use of the $<TARGET_FILE:...> generator expression as a
replacement for the use of the LOCATION target property. The use of the
LOCATION target property is now deprecated for in-build targets.
Also drop other checks for older CMake versions:
* Simplify cmake_set_target_folder macro.
* Use find_package(LibArchive) unconditionally.
* Simplify condition for running testVisualStudioSlnParser test.
* Convert two macros to functions.
* Unconditionally run the CTestTestRerunFailed test.
Extract upstream KWSys using the following shell commands.
$ git archive --prefix=upstream-kwsys/ 6eab64c3 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' 96b2f6f4..6eab64c3
Raphael Kubo da Costa (1):
6eab64c3 SystemInformation: Include backtrace-related headers on FreeBSD
Change-Id: Ib0447aab3d6555ce278f0c1417af2c53e6f181a5
list(APPEND) has been able to append nothing since commit a06dcdba
(Allow LIST(APPEND) command to append nothing, 2008-01-16) but the
documentation still used to imply that at least one argument is
required.
The final location and name of a build-target is not determined
until generate-time. However, reading the LOCATION property from
a target is currently allowed at configure time. Apart from creating
possibly-erroneous results, this has an impact on the implementation
of cmake itself, and prevents some major cleanups from being made.
Disallow reading LOCATION from build-targets with a policy. Port some
existing uses of it in CMake itself to use the TARGET_FILE generator
expression.