mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 20:00:51 -05:00
Help: Document the CMAKE_EXPORT_COMPILE_COMMANDS variable
This commit is contained in:
committed by
Brad King
parent
b8d002af1a
commit
6e92f7b2de
@@ -0,0 +1,30 @@
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS
|
||||
-----------------------------
|
||||
|
||||
Enable/Disable output of compile commands during generation.
|
||||
|
||||
If enabled, generates a ``compile_commands.json`` file containing the exact
|
||||
compiler calls for all translation units of the project in machine-readable
|
||||
form. The format of the JSON file looks like:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
[
|
||||
{
|
||||
"directory": "/home/user/development/project",
|
||||
"command": "/usr/bin/c++ ... -c ../foo/foo.cc",
|
||||
"file": "../foo/foo.cc"
|
||||
},
|
||||
|
||||
...
|
||||
|
||||
{
|
||||
"directory": "/home/user/development/project",
|
||||
"command": "/usr/bin/c++ ... -c ../foo/bar.cc",
|
||||
"file": "../foo/bar.cc"
|
||||
}
|
||||
]
|
||||
|
||||
.. note::
|
||||
This option is implemented only by :ref:`Makefile Generators`
|
||||
and the :generator:`Ninja`. It is ignored on other generators.
|
||||
Reference in New Issue
Block a user