{"id":35081,"date":"2025-02-20T15:52:32","date_gmt":"2025-02-20T15:52:32","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=35081"},"modified":"2025-02-20T15:52:32","modified_gmt":"2025-02-20T15:52:32","slug":"visual-studio-code-cmake-tools-extension-1-20-release-introducing-built-in-cmake-language-services","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/visual-studio-code-cmake-tools-extension-1-20-release-introducing-built-in-cmake-language-services\/","title":{"rendered":"Visual Studio Code CMake Tools Extension 1.20 Release: Introducing Built-In CMake Language Services"},"content":{"rendered":"<p>The<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cmake-tools\"> February release of CMake Tools<\/a> in VS Code is now available. With this release, we have some new updates to the extension to improve CMake integrations with the extension\u2019s support.<\/p>\n<p>Some updates include the<strong> built-in support for CMake Language services<\/strong>, addressing our most highly-upvoted issues in the CMake Tools extension, and <strong>CMake presets v9 support.<\/strong> To view the full list of updates with this release, please look at our\u00a0<a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/blob\/main\/CHANGELOG.md\">CHANGELOG<\/a>.<\/p>\n<p>This release features the following nine contributions from our open-source community. Thank you for your continued support!<\/p>\n<ol>\n<li><a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/issues\/1078\">Adding support to configure default folder in workspace setting<\/a> by <a href=\"https:\/\/github.com\/sanore\">@sanore<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/pull\/4129\">Improving test output for error and skipped tests<\/a> by<a href=\"https:\/\/github.com\/redstrate\"> @redstrate<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/pull\/4241\">Adding a setting to skip project re-build before CTest<\/a> by <a href=\"https:\/\/github.com\/Dabsunter\">@dabsunter<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/pull\/4206\">Ability to pass custom target to CMake: Build Target<\/a> by <a href=\"https:\/\/github.com\/hippo91\">@hippo91<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/pull\/4154\">Fixing issue where setting CTest suite delimiter prevented execution of all tests<\/a> by <a href=\"https:\/\/github.com\/hippo91\">hippo91<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/pull\/3950\">Fixing issue where GCC linker errors did not show up in Problems View<\/a> by <a href=\"https:\/\/github.com\/0xemgy\">@0xemgy<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/pull\/4209\">Fixing compilation database path comparison with cmake.copyCompileCommands<\/a> by <a href=\"https:\/\/github.com\/k0zmo\">@k0zmo<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/pull\/4202\">Fixing configure preset detection issue when referenced in workflow preset by CMakeUserPresets.json<\/a> by <a href=\"https:\/\/github.com\/nikobockerman\">@nikobockerman<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/issues\/4146\">Fixing issue where select active folder did not work when having the same name as the project<\/a> by <a href=\"https:\/\/github.com\/mnastm\">@mnastm\u00a0<\/a><\/li>\n<\/ol>\n<h3>Built-in support for CMake Language Services<\/h3>\n<p>Our highest upvoted issues in the CMake Tools extension (<a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/issues\/534\">184 votes<\/a>!) was to provide in-house support for language services for CMake.<\/p>\n<p>We have begun our work to fully integrate IntelliSense directly into the CMake Tools extension. This includes integrations for colorization and quick info for CMake built-ins, now directly available with the CMake Tools extension, removing the dependency on the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=twxs.cmake\">out-of-date twxs extension<\/a>.<\/p>\n<h5><em><strong>What are CMake Language Services?<\/strong><\/em><\/h5>\n<p>These are rich <a href=\"https:\/\/code.visualstudio.com\/docs\/editor\/intellisense\">IntelliSense<\/a> features that provide code completions and member lists within CMakeLists.txt files and other CMake scripts, giving you quick access to view all applicable CMake scripting features.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-member-list.png\"><img decoding=\"async\" class=\" wp-image-35082 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-member-list.png\" alt=\"CMake IntelliSense services providing CMake built-in code completion suggestions.\" width=\"1063\" height=\"597\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-member-list.png 1480w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-member-list-300x168.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-member-list-1024x575.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-member-list-768x431.png 768w\" sizes=\"(max-width: 1063px) 100vw, 1063px\" \/><\/a><\/p>\n<p>CMake language services offer rich syntax highlighting for CMakeLists.txt and other CMake script files, which is in-line with other programming languages like C++.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/syntax-highlighting.png\"><img decoding=\"async\" class=\" wp-image-35083 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/syntax-highlighting.png\" alt=\"Syntax highlighting available to colorize a CMakeLists.txt file\" width=\"868\" height=\"369\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/syntax-highlighting.png 1075w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/syntax-highlighting-300x128.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/syntax-highlighting-1024x435.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/syntax-highlighting-768x326.png 768w\" sizes=\"(max-width: 868px) 100vw, 868px\" \/><\/a><\/p>\n<p>Within these CMake files, users can access detailed information about any built-in CMake variables by hovering over them, making CMake development easier to understand.<\/p>\n<h3><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-hover.png\"><img decoding=\"async\" class=\"wp-image-35084 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-hover.png\" alt=\"Quick Info available when you hover over a CMake variable.\" width=\"1309\" height=\"188\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-hover.png 1804w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-hover-300x43.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-hover-1024x147.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-hover-768x110.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/02\/cmake-hover-1536x221.png 1536w\" sizes=\"(max-width: 1309px) 100vw, 1309px\" \/><\/a>CMake Presets v9 Support<\/h3>\n<p>We now support CMake presets v9, which allows you to use <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/manual\/cmake-presets.7.html#macro-expansion\">all macros except $env{} macros<\/a> in the <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/manual\/cmake-presets.7.html#includes\">include<\/a> field of a preset.<\/p>\n<p>For example, if you want to specify your CMakePresets.json to include other files not hardcoded, using the path to the directory containing the preset file which contains the macro, you\u2019ll be able to run the following CMake presets JSON specifications at the top of your file.<\/p>\n<pre><strong>\u00a0 \"version\": 9<\/strong>,\r\n\r\n\u00a0 \"cmakeMinimumRequired\": {\r\n\r\n\u00a0 \u00a0 \"major\": 3,\r\n\r\n\u00a0 \u00a0 \"minor\": 30,\r\n\r\n\u00a0 \u00a0 \"patch\": 0\r\n\r\n\u00a0 },\r\n\r\n<strong>\u00a0 \"include\": [\"${fileDir}\"],<\/strong>\r\n\r\n\u00a0 \"configurePresets\":...<\/pre>\n<h3>What&#8217;s Next?<\/h3>\n<p>We have a lot of exciting new things planned for 1.21, including adding <a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/issues\/4261\">even more enhancements<\/a> to our CMake language services and <a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/issues\/4112\">improvements to multi-root workspace configurations<\/a> in our extension. You can view our plans any time via <a href=\"https:\/\/github.com\/orgs\/microsoft\/projects\/1024\/views\/4\">our GitHub project view<\/a>.<\/p>\n<h3>What do you think?<\/h3>\n<p>Download Visual Studio Code and let us know what you think.\u00a0We would love to see what you\u00a0contribute to our<a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\">\u00a0repo<\/a>\u00a0and we are active on reviews and collaboration.\u00a0Please create an\u00a0<a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/issues\/\">issue<\/a>\u00a0if\u00a0there\u2019s\u00a0anything\u00a0you\u2019d\u00a0like to see and upvote\/downvote any existing issues.\u00a0Comment below or reach us via email at\u00a0<a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a>\u00a0or via\u00a0X at\u00a0<a href=\"https:\/\/twitter.com\/visualc\">@VisualC<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The February release of CMake Tools in VS Code is now available. With this release, we have some new updates to the extension to improve CMake integrations with the extension\u2019s support. Some updates include the built-in support for CMake Language services, addressing our most highly-upvoted issues in the CMake Tools extension, and CMake presets v9 [&hellip;]<\/p>\n","protected":false},"author":85413,"featured_media":35082,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[266,275],"tags":[],"class_list":["post-35081","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cmake","category-visual-studio-code"],"acf":[],"blog_post_summary":"<p>The February release of CMake Tools in VS Code is now available. With this release, we have some new updates to the extension to improve CMake integrations with the extension\u2019s support. Some updates include the built-in support for CMake Language services, addressing our most highly-upvoted issues in the CMake Tools extension, and CMake presets v9 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/35081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/85413"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=35081"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/35081\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35082"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=35081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=35081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=35081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}