[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] CMake plugins
|
Am Donnerstag, 9. November 2017, 09:12:28 CET schrieb Stéphane Ancelot:
> Hi ,
Sorry, could not find the original post, put fortunately, it was below.
[Replies inline]
> Le 15/10/2017 à 22:03, Morgner Felix a écrit :
> > Hi list,
> >
> > I am currently working on CDT based CMake integration myself for my
> > semester project. I plan on implementing project creation as well as
> > import/sync, an editor with semantic completion, and CMake server
> > integration. I feel it would be reasonable to join forces on this. I will
> > be talking to my supervisor tomorrow, and wanted you to know that I would
> > be very much interested in contributing to the CDT CMake integration.
> >
> > Felix
Hi Felix,
to join forces: I have implemented a parser that reads the
compiler_commands.json file generated by cmake and feeds the preprocessor
defines, undefines and include path to the indexer.
If you are planning to use the cmake server-mode to gather the same kind of
information, be warned!
I found some annoying things in the compiler_commands.json file under windows.
1) File system paths are inconsistent: Sometimes path are in
1.1) cmake internal representation (forward slashes, e.g. 'H:/some/path/to/
include'), sometimes in
1.2) Windows cmd.exe format (backward slashes, e.g. 'H:\some\path\to
\include'), sometimes in
1.3) Windows cmd.exe format as Java-source-string-literal ('H:\\some\\path\\to
\\include')
2) compiler_commands.json commandline entries reflect the *actual*
commandline, not the *intended* commandline. That is, the actual commandline
does not contain the include directories. Cmake puts these directory name in a
(compiler specific) response file. So you will need extra parsers to get the
include directory names out of the response file.
Before you start: Check, whether cmake server-mode produces the same
inconsistent output!
/Martin
--
Cd wrttn wtht vwls s mch trsr.