Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using compdb with cmake's "include_directories()" results in clangd errors #21

Open
zyansheep opened this issue May 1, 2020 · 1 comment

Comments

@zyansheep
Copy link

I use include_directories(src) with cmake so I can include absolute paths from the src/ directory for C++ files. It compiles fine, but clangd yells at me that it can't find absolute paths include files

structure:
src
├── Engine
│ ├── Renderer.cpp
│ ├── Renderer.h
├── Game
│ ├── Chunks.cpp
│ ├── Chunks.h
└── Main.cpp
I get 'Engine/Renderer.h' file not found from clangd when included this way:
#include "Engine/Renderer.h"

It works fine relatively:
#inlude "../Engine/Renderer.h"

Is this a problem with compdb or with how cmake exports compile_commands.json?

@ubaldot
Copy link

ubaldot commented Feb 16, 2022

I am interested.
Have you found a solution? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants