开发者

How can I help Intellisense find include paths based on CMake variables?

开发者 https://www.devze.com 2022-12-07 17:32 出处:网络
I\'m trying to use Android NDK in my project, for which I\'m using Visual Studio Code. This means I have a CMakeLists.txt file that uses a ANDROID_NDK variable in order to find both include and source

I'm trying to use Android NDK in my project, for which I'm using Visual Studio Code. This means I have a CMakeLists.txt file that uses a ANDROID_NDK variable in order to find both include and source files, and building works. However, Intellisense is not working, meaning that coding is a real pain since it can't recognize includes. I tried using CMAKE_EXPORT_COMPILE_COMMANDS but it just won't work as intended. Should I just manually edit vscode's includePath and expect everyone I share my code with to do the same? Whatever the solution may be, I'd rather have CMakeLists.txt modified so开发者_运维问答 it can help any IDE/editor, but vscode-specific solutions are ok if there's no other way.

I tried set(CMAKE_EXPORT_COMPILE_COMMANDS ON) and editing the appropriate vscode variable for compile commands path but it just won't help.

0

精彩评论

暂无评论...
验证码 换一张
取 消