blob: 85b5394fdd66a45f2859afee1f68ee956c48ba93 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Available Language Setting Providers</title>
<!--
TODO update this! We do not use Language Setting Providers in core build!
-->
<style type="text/css">
table, th, td {
border: 1px solid black;
}
th, td {
padding: 2pt;
}
</style>
</head>
<body>
<h1>Preprocessor Include Paths, Macros</h1>
<P>Include paths and preprocessor macros for the CDT source code indexer are supplied by
<strong>Language Settings Providers</strong> using the
<a href="PLUGINS_ROOT/org.eclipse.cdt.doc.user/tasks/cdt_t_sd.htm">Scanner Discovery</a>
mechanism. The C/C++/CUDA editors use the indexer to improve syntax highlighting, allowing you to jump to
macro definitions and to browse through include files.
</P>
<p>The CDT CMake support provides two <a href="PLUGINS_ROOT/org.eclipse.cdt.doc.user/concepts/cdt_c_scanner_discovery.htm">Language Settings Providers</a>:</p>
<h2>CMAKE_EXPORT_COMPILE_COMMANDS Parser</h2>
<p>This provider instructs CMake to generate a file that contains all the compiler command-lines
which will be executed when a project is build.<br/>
The provider will parse that file and feed any preprocessor include path, macro definition or
macro undefine that originates from your <em>CMakeLists.txt</em> files to the indexer.<br/>
Parsing is done rarely, since the internal cache is invalidated only when the
file`s time-stamp is newer, so it should be reasonably fast.
</p>
<p>The following table lists the compiler executables supported by the CMAKE_EXPORT_COMPILE_COMMANDS Parser.</p>
<table id="overview_table" style="border-collapse:collapse">
<thead>
<tr>
<th>Compiler</th>
<th>Vendor/Standard</th>
<th>Language</th>
<th>Macros</th>
<th>Include directories</th>
<th>System include<br/>directories</th>
<th>Compiler executables</th>
</tr>
</thead>
<tbody>
<tr>
<td>gcc</td>
<td>GNU Project</td>
<td>C</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>cc, cc.exe, gcc, gcc.exe, <a href="#fw-gcc-cross">".+-gcc"</a>, <a href="#fw-gcc-cross">".+-gcc.exe"</a></td>
</tr>
<tr>
<td>g++</td>
<td>GNU Project</td>
<td>C++</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>c++, c++.exe, g++, g++.exe, <a href="#fw-g++-cross">".+-g\+\+"</a>, <a href="#fw-g++-cross">".+-g\+\+.exe"</a>
, <a href="#fw-g++-cross">".+-c\+\+"</a>, <a href="#fw-g++-cross">".+-c\+\+.exe"</a></td>
</tr>
<tr>
<td>clang</td>
<td>LLVM Project</td>
<td>C</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>clang, clang.exe</td>
</tr>
<tr>
<td>clang++</td>
<td>LLVM Project</td>
<td>C++</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>clang++, clang++.exe</td>
</tr>
<tr>
<td>cc</td>
<td>POSIX</td>
<td>C</td>
<td>Yes</td>
<td>Yes</td>
<td>No</td>
<td>cc, cc.exe</td>
</tr>
<tr>
<td>c++</td>
<td>POSIX</td>
<td>C++</td>
<td>Yes</td>
<td>Yes</td>
<td>No</td>
<td>c++, c++.exe</td>
</tr>
</tbody>
</table>
<p>Remarks:</p>
<ul style="list-style-type:none">
<li id="fw-help-gcc-cross">".+-gcc" This representes a Java regular expression that also matches
a <a href="https://wiki.osdev.org/Target_Triplet#Structure">target triplet</a>, thus allowing to work with cross-compilers
named like e.g. <code>arm-none-eabi-gcc</code>.</li>
<li id="fw-help-gcc-cross">".+-g\+\+" This representes a Java regular expression that also matches
a <a href="https://wiki.osdev.org/Target_Triplet#Structure">target triplet</a>, thus allowing to work with cross-compilers
named like e.g. <code>arm-none-eabi-g++</code>.</li>
</ul>
<h3>Compilers supported through separate plug-ins</h3>
<!-- extra compilers go here -->
<anchor id="extra_detection_participant_list"/>
<h2>CMAKE_EXPORT_COMPILE_COMMANDS Compiler Built-ins</h2>
<p>This provider works similar to <q>CMAKE_EXPORT_COMPILE_COMMANDS Parser</q>, but invokes
the compiler with arguments to get the include paths and preprocessor macros
<strong>built-in to the compiler</strong>.<br/>
Note that this works only for compilers that supporting it.
See <a href="builtins-detection.xhtml">built-ins detection</a> for supported compilers.
</p>
</body>
</html>