# cmake-file-api code model version 2.1

**URL:** https://discourse.cmake.org/t/cmake-file-api-code-model-version-2-1/1465
**Category:** Usage
**Created:** [June 30, 2020, 4:38pm UTC](https://discourse.cmake.org/t/cmake-file-api-code-model-version-2-1/1465 "2020-06-30T16:38:59Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Bob\_Brown](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bob_brown/32/715_2.png) [@Bob\_Brown](https://discourse.cmake.org/u/Bob_Brown)
#### Post date: [June 30, 2020, 4:38pm UTC](https://discourse.cmake.org/t/cmake-file-api-code-model-version-2-1/1465/1 "2020-06-30T16:38:59Z")

</div>

Hello,

We maintain the CMake Tools extension for VS Code and we’re seeing reports of a new minor revision of the code model for cmake-file-api(7) in version 3.18-rc1 and above (revision 2.1). I couldn’t find any documentation for the changes online. Could you point me to them so that we can update our extension to support it?

Thank you,  
Bob

[https://cmake.org/cmake/help/v3.18/manual/cmake-file-api.7.html#codemodel-version-2](https://cmake.org/cmake/help/v3.18/manual/cmake-file-api.7.html#codemodel-version-2)

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [June 30, 2020, 5:16pm UTC](https://discourse.cmake.org/t/cmake-file-api-code-model-version-2-1/1465/2 "2020-06-30T17:16:37Z")

</div>

The link you posted contains the new fields added in 2.1. However, it does not mention the version bump - I’ll fix that.

That being said, minor version updates are backwards compatible - you don’t need to update for them unless they add functionality that you want.

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [June 30, 2020, 5:26pm UTC](https://discourse.cmake.org/t/cmake-file-api-code-model-version-2-1/1465/3 "2020-06-30T17:26:44Z")

</div>

I’ve opened [https://gitlab.kitware.com/cmake/cmake/-/merge\_requests/4956](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4956) to fix the minor version.

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [June 30, 2020, 5:32pm UTC](https://discourse.cmake.org/t/cmake-file-api-code-model-version-2-1/1465/4 "2020-06-30T17:32:42Z")

</div>

The 2.1 update adds a `precompileHeaders` field.

---

<div class="post-metadata">

### Author: ![Bob\_Brown](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bob_brown/32/715_2.png) [@Bob\_Brown](https://discourse.cmake.org/u/Bob_Brown)
#### Post date: [June 30, 2020, 5:36pm UTC](https://discourse.cmake.org/t/cmake-file-api-code-model-version-2-1/1465/5 "2020-06-30T17:36:47Z")

</div>

Thank you. Will you be able to keep a running document with the changes (or list which properties were added in which revision)? This will make it easier for us to tell the differences between versions.

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [June 30, 2020, 5:37pm UTC](https://discourse.cmake.org/t/cmake-file-api-code-model-version-2-1/1465/6 "2020-06-30T17:37:23Z")

</div>

We’re going to add release notes and “added in version” documentation.

Edit: added - please see [https://gitlab.kitware.com/cmake/cmake/-/merge\_requests/4956](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4956).
