mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
CMake.md: Use markdown list instead of HTML table
This commit is contained in:
parent
e9f2907efc
commit
1b3fcbcd8d
@ -1,37 +1,23 @@
|
||||
# CMake options
|
||||
|
||||
<!-- Pure markdown doesn't support code blocks within tables -->
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Option</th>
|
||||
<th>Effect</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>-D CMAKE_BUILD_TYPE=Debug</td>
|
||||
<td>Enables debug info and disables optimizations</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-D CMAKE_EXPORT_COMPILE_COMMANDS=ON</td>
|
||||
<td>Creates <code>compile_commands.json</code> for <a href="https://clangd.llvm.org/"><code>clangd</code></a> language server
|
||||
<br><br>
|
||||
For clangd to find the JSON, create a file named <code>.clangd</code>
|
||||
<pre>.
|
||||
├── vcmi -> contains sources and is under git control
|
||||
├── build -> contains build output, makefiles, object files,...
|
||||
└── .clangd</pre>
|
||||
with the following content
|
||||
<pre>CompileFlags:<br> CompilationDatabase: build</pre></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-D ENABLE_CCACHE:BOOL=ON</td>
|
||||
<td>Speeds up recompilation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-G Ninja</td>
|
||||
<td>Use Ninja build system instead of make, which speeds up the build and doesn't require a <code>-j</code> flag</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
* `-D CMAKE_BUILD_TYPE=Debug`
|
||||
* Enables debug info and disables optimizations
|
||||
* `-D CMAKE_EXPORT_COMPILE_COMMANDS=ON`
|
||||
* Creates `compile_commands.json` for [clangd](https://clangd.llvm.org/) language server.
|
||||
|
||||
For clangd to find the JSON, create a file named `.clangd` with this content
|
||||
```
|
||||
CompileFlags:
|
||||
CompilationDatabase: build
|
||||
```
|
||||
and place it here:
|
||||
```
|
||||
.
|
||||
├── vcmi -> contains sources and is under git control
|
||||
├── build -> contains build output, makefiles, object files,...
|
||||
└── .clangd
|
||||
```
|
||||
* `-D ENABLE_CCACHE:BOOL=ON`
|
||||
* Speeds up recompilation
|
||||
* `-G Ninja`
|
||||
* Use Ninja build system instead of Make, which speeds up the build and doesn't require a `-j` flag
|
Loading…
Reference in New Issue
Block a user