I am using cmake4eclipse for all my cmake projects especially because of the "CMAKE_EXPORT_COMPILE_COMMANDS Parser" because it simplifies the management of includes and symbols in eclipse a lot.
Unfortunately I discovered that parsing of macros (e.g. add_definitions(-DFOO=1)) seems to be broken in version 1.12.2 while parsing of includes (-I and --system) works just fine. To make sure it's not a personal config failure I followed the "User Guide -> Getting Started" instructions closely but the plugin is still not recognizing any macro definitions even though they occur in the "compile_commands.json" file. I also tried the sample projects [1] but even their macros aren't parsed.
I checked the issues on Github but none of the open ones seems to address this problem. Issue #79[3] might be related but parsing of built in macros and includes by "CMAKE_EXPORT_COMPILE_COMMANDS Compiler Built-ins" works just fine while #84[2] sounds very similar but was closed/fixed in July and should be included in 1.12.2 already.
Is this a known problem or should I open a new Issue for this?
I used two different setups but the problem occurred on both of them:
Setup 1:
- Gentoo Linux 4.14.65 amd64
- Oracle JRE 1.8.0.192
- Eclipse 2018-09 (4.9.0)
- Eclipse CDT 9.5.3
- cmake4eclipse 1.12.2
- cmake 3.9.6
Setup 2:
- Windows 7
- MinGW-w64 x86_64-6.4.0
- Oracle JRE 1.8.0.151
- Eclipse Photon (4.8.0)
- cmake4eclipse 1.12.2
- cmake 3.12.1
I would be happy to provide any more information that is necessary to solve this problem.
Best
Torsten
[1] https://github.com/15knots/cmake4eclipse-sample-projects
[2] https://github.com/15knots/cmake4eclipse/issues/84
[3] https://github.com/15knots/cmake4eclipse/issues/79
Obviously this feature is working correctly but I'm just not implementing it right. Anyone have an idea I could try?