mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 00:00:39 -05:00
cmExperimental: gate build database support behind a flag
Given that the feature currently only supports C++ sources and is not formally accepted by ISO yet, gate it behind a flag.
This commit is contained in:
@@ -80,3 +80,24 @@ When activated, this experimental feature provides the following:
|
||||
|
||||
.. _CPS: https://cps-org.github.io/cps/
|
||||
.. |CPS| replace:: Common Package Specification
|
||||
|
||||
Build database support
|
||||
======================
|
||||
|
||||
In order to activate support for exporting build databases, set
|
||||
|
||||
* variable ``CMAKE_EXPERIMENTAL_EXPORT_BUILD_DATABASE`` to
|
||||
* value ``4bd552e2-b7fb-429a-ab23-c83ef53f3f13``.
|
||||
|
||||
This UUID may change in future versions of CMake. Be sure to use the value
|
||||
documented here by the source tree of the version of CMake with which you are
|
||||
experimenting.
|
||||
|
||||
When activated, this experimental feature provides the following:
|
||||
|
||||
* The :prop_tgt:`EXPORT_BUILD_DATABASE` target property and its initializing
|
||||
variable :variable:`CMAKE_EXPORT_BUILD_DATABASE` and environment variable
|
||||
:envvar:`CMAKE_EXPORT_BUILD_DATABASE`.
|
||||
|
||||
* Targets with the property set to a true value will have their C++ build
|
||||
information exported to the build database.
|
||||
|
||||
@@ -9,3 +9,9 @@ The default value for :variable:`CMAKE_EXPORT_BUILD_DATABASE` when there is no
|
||||
explicit configuration given on the first run while creating a new build tree.
|
||||
On later runs in an existing build tree the value persists in the cache as
|
||||
:variable:`CMAKE_EXPORT_BUILD_DATABASE`.
|
||||
|
||||
.. note ::
|
||||
|
||||
This variable is meaningful only when experimental support for build
|
||||
databases has been enabled by the
|
||||
``CMAKE_EXPERIMENTAL_EXPORT_BUILD_DATABASE`` gate.
|
||||
|
||||
@@ -7,3 +7,9 @@ Enable/Disable output of a build database for a target.
|
||||
|
||||
This property is initialized by the value of the variable
|
||||
:variable:`CMAKE_EXPORT_BUILD_DATABASE` if it is set when a target is created.
|
||||
|
||||
.. note ::
|
||||
|
||||
This property is meaningful only when experimental support for build
|
||||
databases has been enabled by the
|
||||
``CMAKE_EXPERIMENTAL_EXPORT_BUILD_DATABASE`` gate.
|
||||
|
||||
@@ -3,6 +3,12 @@ CMAKE_EXPORT_BUILD_DATABASE
|
||||
|
||||
.. versionadded:: 3.31
|
||||
|
||||
.. note ::
|
||||
|
||||
This variable is meaningful only when experimental support for build
|
||||
databases has been enabled by the
|
||||
``CMAKE_EXPERIMENTAL_EXPORT_BUILD_DATABASE`` gate.
|
||||
|
||||
Enable/Disable output of module compile commands during the build.
|
||||
|
||||
If enabled, generates a ``build_database.json`` file containing the
|
||||
|
||||
Reference in New Issue
Block a user