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.
精彩评论