GithubHelp home page GithubHelp logo

Comments (4)

jonahgraham avatar jonahgraham commented on July 24, 2024

@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.

15knots avatar 15knots commented on July 24, 2024

@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.

fidelski avatar fidelski commented on July 24, 2024

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.

ventsyv avatar ventsyv commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.