Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CMake support in Eclipse CDT

Am Mittwoch, 2. Dezember 2015, 01:21:38 schrieb Doug Schaefer:

> toolchain definition file to use with CMake. Then how to get the compile
> options from CMake to feed scanner discovery. Hopefully it’s similar to
> qmake which I can dump pretty much every variable that feeds into the
> Makefile generation.

Getting the compile options (preprocessor-macros and include paths) to feed 
the indexer is nearly impossible. Cmake has no option to dump these 
(CMAKE_EXPORT_COMPILE_COMMANDS works only for makefiles). cmake places that 
information in the generated build scripts, which may be makefiles or 
ninja.rules-files or whatever-build-tool files.
If you want to give end users a choice for the build tool, you will end up in 
writing parsers for these build scripts plus adding mechanics to find these.

My cmake4eclipse plugin tries to feed the indexer by parsing the build output. 
But that fails on windows or if users chose to use ninja instead of make.

IMHO, all IDE developer teams that want to integrate cmake into their IDE, 
should stick heads together, find consent on the required information (at 
least for the C/C++ language) and talk to the cmake team. According to [1], 
they are aware of the problem, but (my guess) they need input from the IDE 
developr side.

I see these IDE developer teams:
- CDT
- Kdevelop (<neundorf@xxxxxxx>, already on his list and on the make developers 
list)
- Jetbrains (IDEA) has this problem too, IIRC

Martin

[1] https://cmake.org/pipermail/cmake-developers/2015-March/024666.html

-- 
Cd wrttn wtht vwls s mch trsr.




Back to the top