cmakefileapi-parser warning message about CMake in windows-VSCode

Viewed 2208
[cmakefileapi-parser] Code model version (2.1) of cmake-file-api is unexpected. Expecting (2.0). IntelliSense configuration may be incorrect.
[cmakefileapi-parser] Code model version (2.1) of cmake-file-api is unexpected. Expecting (2.0). IntelliSense configuration may be incorrect.
[build] Build finished with exit code 0

I'm learning C++ in windows-VSCode. When I use CMake to run a helloworld, it show this. Maybe it has succeed, but I am really mind this [cmakefileapi-parser] message. How can I set it correctly?

2 Answers

I had the exact same problem with cmake version 3.18.0-rc1 (release candidate).

I you use the latest stable release of cmake (version 3.17.3) instead, the problem should disappear ;-)

According to the CMake authors, version 2.1 of the CMake File API is completely backward-compatible with version 2.0, which is the latest version that your VSCode version knows about. So this warning can be safely ignored. There is already a fix in for the next version of the CMake addon, so this warning will go also go away when the next version of that addon is released.

Related