[cmakefileapi-parser] Code model version (2.1) of cmake-file-api is unexpected. Expecting (2.0). IntelliSense configuration may be incorrect.
See original GitHub issueI am trying to build a c++ project on windows with visual studio code and cmake-tools extension.
My versions are cmake: 3.18.0-rc1 cmake tools (vscode extension): 1.4.1
When I build, I get this annoying message about codemodel version.
[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.
This messages appear at configuration, and also when I build.
It is the exact same problem mentionned by someone else in this stackoverflow question : https://stackoverflow.com/questions/62445673/cmakefileapi-parser-warning-message-about-cmake-in-windows-vscode
One of the comments on stackoverflow suggests to edit the file
\build\.cmake\api\v1\reply\codemodel-v2-[???].json
and edit the minor version at the bottom of the file from ‘1’ to ‘0’.
It does make the messages disappear for build after this changes, but as this file is generated at configuration, the warning comes back everytime you want to run cmake again…
Also I don’t know if this modification breaks anything or not.
UPDATE: when writing this issue and checking my version of cmake, I figured out I was using a release candidate (for some reason it is the first displayed on cmake website and I did not pay attention when I downloaded it). I installed the latest cmake release (3.17.3) instead, and the problem “disappeared”.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:10 (5 by maintainers)
Top GitHub Comments
CMake upstream here, this is a minor update which only adds new fields to the File API output - it won’t break older clients. The warning is safe to ignore.
I’ve opened #1343 to suppress the warning for newer versions.
The remaining message will be fixed in 1.5