this is my setup:
Eclipse Neon 4.6.3
Eclipse CDT 9.2.1
cmake4eclipse 1.14.0
CMake 3.12.2
I am adding some include directories in the CMakeLists.txt with
target_include_directories(${THETARGET} PUBLIC ${THE_INCLUDE_DIRS})
Building works, and all header files within the project are indexed/found so when i click on a #include i can navigate to the header file.
Now i want to use SonarLint for static code analysis which is an Eclipse Plugin to basically run SonarQube locally. It requires the include directories being configured/present in the CDT project configuration. When i add all the include dirs manually with "Properties" -> C/C++ General -> Paths and Symbols -> Includes it works but it would be great if the include dirs would be added automatically by the cmake4eclipse plugin.
Is this maybe already possible, planned or out of scope?
I already enabled the "CMAKE_EXPORT_COMPILE_COMMANDS Parser" but this had no effect.
thx,
Peter
> Now i want to use SonarLint for static code analysis which is an Eclipse
> Plugin to basically run SonarQube locally. It requires the include
> directories being configured/present in the CDT project configuration. When
Does it really required that? If so, SonarLint would not know about the
include paths built in to the gcc compiler.
> i add all the include dirs manually with "Properties" -> C/C++ General ->
> Paths and Symbols -> Includes it works but it would be great if the include
> dirs would be added automatically by the cmake4eclipse plugin.
>
> Is this maybe already possible, planned or out of scope?
>
> I already enabled the "CMAKE_EXPORT_COMPILE_COMMANDS Parser" but this had no
> effect.
Not quite sure what 'no effect' does refer to. The purpose of the
"CMAKE_EXPORT_COMPILE_COMMANDS Parser" is to tell the CDT indexer about the
target_include_directories(). The includes show up in the Preprocessot Include
Paths, Macros etc page in the project configuration.
Martin
--
Cd wrttn wtht vwls s mch trsr.
--
You received this message because you are subscribed to the Google Groups "cmake4eclipse user mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cmake4eclipse-u...@googlegroups.com.
To post to this group, send email to cmake4ecl...@googlegroups.com.
Visit this group at https://groups.google.com/group/cmake4eclipse-users.
For more options, visit https://groups.google.com/d/optout.