CLion target for library code completion

Would it be possible to add a target by default to clion projects so that code completion works on the libs folder? I generally add

add_custom_target(
        CODE_COMPLETION_DUMMY
        SOURCES lib
)

to the cmake file but i need to add it after every time i rebuild the project index, which is a bit of a pain after a while.

Done! Please upgrade PIO Core via pio upgrade --dev and re-init project

2 Likes

wow… thank you so much for such a fast response!

I’m having this issue on 4.1.0 and 4.2.0.
My project compiles fine, but I get red underlines for libraries included from in-project lib folder.
No intellisense either.

Checked the git log and noticed that the fix was reverted a month later.

What’s the current workaround?

Never mind that. It started working in 4.2.0 after I restarted CLion several times.