Comments (4)
@fidelski Thank you for the very clear bug report.
@15knots is this something in your knowledge area? @fidelski is using cmake generator (instead of https://github.com/15knots/cmake4eclipse) but I am hoping you know/understand the problem. If not I will dig into it.
from cdt.
@fidelski The problem is the generator specified for cmake. You are using cmake -G "Eclipse CDT4 - Ninja"
which generates a .cproject for CDT 4 and is considered deprecated since some years. These kind of generated projects do not give CDT a chance to feed its indexer.
The Includes folder that is showing up in the Project Explorer has no special meaning to CDT.
Either use cmake4eclipse or the experimental CMake support for CDT. Each of them is designed to run cmake and let it generate the build-scripts,. No need to invoke cmake from the commandline.
from cdt.
I have tried with cmake4eclipse but to no avail. I need to be able to provide a toolchain file, doing so by providing the relevant cache entry CMAKE_TOOLCHAIN_FILE
works so the build succeeds, but all entries in compile_commands.json
are completely ignored. Instead of the include folder of the used compiler (that is set in the toolchain file) all GNU C++ default system includes are used. It even lists those entries as part of the CMake compilation database entries, which is just wrong. Also no build targets are available, instead, in the tab with the build targets all directories in the build folder are listed. At least these things work in the CMake generated eclipse project, all targets are visible and can be launched, and the relevant include folders are present - why are they not used by the indexer? If they would be used all problems would be solved - using the "deprecated" generator, using cmake4eclipse provides an even worse experience.
I haven't found any experimental CMake support for CDT, how can I install this? And are there any plans in moving from experimental to stable?
from cdt.
I have a Cmake project that uses conan. Eclipse fails to index system headers.
As per this thread I looked at the compile_commands.json files and it seem OK. In the command line, I noticed that some directories are included with -I and others with -isystem.
It seems that the ones included with -I are being found by the indexer, but the one with -isystem are not.
For example, a header file for one of my conan dependencies is included like this:
/home/<USER>/.conan/data/<LibName>/<version>/_/_/package/20dabc368b4b844655f0d16e88a36e7204a59f23/include
You can see it for yourself if you clone this repo , then File->Open Project from Filesystem.
I'm not using cmake generated project files, just the built in Cmake functionality.
Ubuntu 22
CDT Version: 2022-12 (4.26.0)
CDT Build id: 20221201-1913
from cdt.
Related Issues (20)
- Launch can connect to serial device rather than REMOTE_TCP under certain conditions HOT 4
- C++-17 syntax colour support HOT 7
- Eclipse CDT Visitor Pattern - (MethodVisitor, FieldVisitor, ClassVisitor) HOT 3
- It occurs "A declaration could not be found for this member definition: XXX" while the function is declared under the namespace HOT 2
- Improve presentation of GNU archive file content in Project Explorer HOT 1
- Closing a CDT project somethimes reopens it on the spot. HOT 1
- “Invalid template argument” error in valid code
- CDT intellisense on SIMD intrinsics
- Cursor not behaving correctly in memory view editor while chaging variable value on Hi-DPI
- Addition of a extensionpoint for tool providers and a tool provider manager. HOT 1
- Keeping plugin.xml files clean HOT 2
- Replace dependency to org.eclipse.osgi.services HOT 2
- Incremental Find in C editor does not work
- Enhance PE64 symbol presentation in Project Explorer HOT 7
- Provide "Other objects" option within MBS GNU archiver description
- CDT cannot be built on Java 21 due to security manager changes
- java.lang.NullPointerException: Cannot invoke "org.eclipse.cdt.core.parser.IToken.getType()" because "token" is null
- Migrate from javax.inject|annotation to Jakarta
- *.S files are not preprocessed in managed builds HOT 11
- Switch from "Require-Bundle: org.eclipse.osgi.services" to "Import-Package" directive HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cdt.