Parser support for QNX qcc and q++ compiler

153 views
Skip to first unread message

Martin Hopfeld

unread,
Mar 12, 2021, 4:30:27 AM3/12/21
to cmake4eclipse user mailing list
Hi,

I'd like to use the QNX qcc/q++ compilers with cmake4eclipse and have eclipse Indexer support.

The QNX compiler is a GNU gcc compiler with the frontend executables qcc (for C) and q++ (for C++) files. You pass the frontend executable command line arguments to indicate which cross toolchain to use (-V gcc_ntoaarch64  or -V gcc_ntoarmv7 or even -V gcc_ntox86_64)
Compilation from CMake works fine, but cmake4eclipse does not recognize the compiler name and thus cannot extract the platform defines for eclipse indexer.

What already works is extraction of project level includes from compile_commands.json.

From the cmake4eclipse documentation I can see, that the "CMAKE_EXPORT_COMPILE_COMMANDS Parsers" do not recognize qcc/q++.


What is be the path forward for support of QNX compilers in cmake4eclipse?
I'm willing to provide compiler output and help investigate problems.


Thanks
Martin

Martin Weber

unread,
Mar 15, 2021, 3:46:30 PM3/15/21
to cmake4ecl...@googlegroups.com
On Freitag, 12. März 2021 10:30:27 CET Martin Hopfeld wrote:
> Hi,
>
> I'd like to use the QNX qcc/q++ compilers with cmake4eclipse and have
> eclipse Indexer support.
>
> The QNX compiler is a GNU gcc compiler with the frontend executables qcc
> (for C) and q++ (for C++) files. You pass the frontend executable command
> line arguments to indicate which cross toolchain to use (-V gcc_ntoaarch64
> or -V gcc_ntoarmv7 or even -V gcc_ntox86_64)
> Compilation from CMake works fine, but cmake4eclipse does not recognize the
> compiler name and thus cannot extract the platform defines for eclipse
> indexer.
...
> What is be the path forward for support of QNX compilers in cmake4eclipse?

There is an extension point allowing 3rd party compiler vendors to hook in
their compilers into cmake4eclipse.
Have a look at <https://github.com/15knots/cmake4eclipse/blob/master/
de.marw.cmake.cdt.lsp.nvidia/src/main/java/de/marw/cmake/cdt/lsp/nvidia/
NvccToolDetectionParticipant.java> or <https://github.com/15knots/
cmake4eclipse/blob/master/de.marw.cmake.cdt.lsp.arm/src/main/java/de/marw/
cmake/cdt/lsp/arm/ArmccToolDetectionParticipant.java> to see how this can be
done.

> I'm willing to provide compiler output and help investigate problems.

Any pull requests would be welcome, too!

Martin


--
Cd wrttn wtht vwls s mch trsr.




Reply all
Reply to author
Forward
0 new messages