{"id":245682,"date":"2023-11-01T08:16:24","date_gmt":"2023-11-01T15:16:24","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=245682"},"modified":"2023-11-01T08:16:24","modified_gmt":"2023-11-01T15:16:24","slug":"latest-updates-for-cmake-development-in-visual-studio","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/latest-updates-for-cmake-development-in-visual-studio\/","title":{"rendered":"Latest Updates for CMake Development in Visual Studio"},"content":{"rendered":"<p><span class=\"TextRun SCXW210175068 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW210175068 BCX8\">Visual Studio has <strong>native <\/strong><\/span><strong><span class=\"NormalTextRun SpellingErrorV2Themed SCXW210175068 BCX8\">CMake<\/span><\/strong><span class=\"NormalTextRun SCXW210175068 BCX8\"><strong> integration<\/strong> that allows C++ users to build and develop using <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SpellingErrorHighlight SCXW210175068 BCX8\">CMake and supports their unique needs<\/span><span class=\"NormalTextRun SCXW210175068 BCX8\">.<\/span> <span class=\"NormalTextRun SpellingErrorV2Themed SCXW210175068 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW210175068 BCX8\"> is a cross-platform build tool for C++ and with Visual Studio\u2019s latest tools, users can be more productive when it comes to configu<\/span><span class=\"NormalTextRun SCXW210175068 BCX8\">ring with <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW210175068 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW210175068 BCX8\">. To learn more about Visual Studio\u2019s <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW210175068 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW210175068 BCX8\"> integration, please see our documentation: <\/span><\/span><a class=\"Hyperlink SCXW210175068 BCX8\" href=\"https:\/\/learn.microsoft.com\/en-us\/cpp\/build\/cmake-projects-in-visual-studio?view=msvc-170\" target=\"_blank\" rel=\"noreferrer noopener\"><span class=\"TextRun Underlined SCXW210175068 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SpellingErrorV2Themed SCXW210175068 BCX8\" data-ccp-charstyle=\"Hyperlink\">CMake<\/span><span class=\"NormalTextRun SCXW210175068 BCX8\" data-ccp-charstyle=\"Hyperlink\"> projects in Visual Studio | Microsoft Learn.<\/span><\/span><\/a><span class=\"EOP SCXW210175068 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span class=\"TextRun SCXW189723918 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW189723918 BCX8\">To add to the available tools for your <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW189723918 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> workflows,<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> in the last year,<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> we<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> have delivered a <strong>new <\/strong><\/span><strong><span class=\"NormalTextRun SpellingErrorV2Themed SCXW189723918 BCX8\">CMake<\/span><\/strong><span class=\"NormalTextRun SCXW189723918 BCX8\"><strong> debugger<\/strong> that allows users to debug their CMakeLists.txt files just like <\/span><span class=\"NormalTextRun SCXW189723918 BCX8\">you<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> would any other C++ file.<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> Additionally, Visual Studio\u2019s <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW189723918 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> integration<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> includes <strong>the <\/strong><\/span><strong><span class=\"NormalTextRun SpellingErrorV2Themed SCXW189723918 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> Targets View, which <\/span><span class=\"NormalTextRun SCXW189723918 BCX8\">allows<\/span> <span class=\"NormalTextRun SCXW189723918 BCX8\">users<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> to visualize <\/span><span class=\"NormalTextRun SCXW189723918 BCX8\">your<\/span> <span class=\"NormalTextRun SpellingErrorV2Themed SCXW189723918 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> project structure by the <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW189723918 BCX8\">CMake<\/span><\/strong><span class=\"NormalTextRun SCXW189723918 BCX8\"><strong> targets<\/strong> and build specified target libraries<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> rather than the traditional folder structure<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> available through the Folder View in the Solution Explorer<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\">.<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> To make this <\/span><span class=\"NormalTextRun SCXW189723918 BCX8\">view easier<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> to navigate, we have implemented a few new improvements<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> such as simplified source navigation and allowing for customized targets to <\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW189723918 BCX8\">exclude<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\"> from the view<\/span><span class=\"NormalTextRun SCXW189723918 BCX8\">.\u00a0<\/span><\/span><span class=\"EOP SCXW189723918 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h3>Debug your CMake scripts with the new CMake Debugger<\/h3>\n<p><span data-contrast=\"auto\">The VS CMake team has worked closely with Kitware on developing a debugger for CMake scripts in the Visual Studio IDE, with the upstreamed work available in the 3.27 release of CMake. This way, you can dive right into debugging your CMakeLists.txt files behind your CMake builds and understand the state of various variables during your configure.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">To initiate a CMake debugging session, you can select <\/span><i><span data-contrast=\"auto\">Configure [Project Name] with CMake Debugger<\/span><\/i><span data-contrast=\"auto\"> from the Project dropdown menu, or when right-clicking on your CMakeLists.txt file in the Solution Explorer.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/Configure-CMake.png\"><img decoding=\"async\" class=\"size-full wp-image-245683 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/Configure-CMake.png\" alt=\"Project dropdown to configure with CMake debugger\" width=\"826\" height=\"607\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/Configure-CMake.png 826w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/Configure-CMake-300x220.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/Configure-CMake-768x564.png 768w\" sizes=\"(max-width: 826px) 100vw, 826px\" \/><\/a><\/p>\n<p><span class=\"TextRun SCXW231992911 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW231992911 BCX8\">When <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW231992911 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW231992911 BCX8\"> cache generation on your project fails, a \u201cDebug\u201d link will also be available in the Solution Explorer to start a <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW231992911 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW231992911 BCX8\"> debugging session.<\/span><\/span><span class=\"EOP SCXW231992911 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-generation-failed.png\"><img decoding=\"async\" class=\"size-full wp-image-245684 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-generation-failed.png\" alt=\"Image showing CMake generation failed and a way to debug.\" width=\"694\" height=\"468\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-generation-failed.png 694w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-generation-failed-300x202.png 300w\" sizes=\"(max-width: 694px) 100vw, 694px\" \/><\/a><\/p>\n<p><span class=\"TextRun SCXW80899380 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW80899380 BCX8\">From here, you can do a<\/span><span class=\"NormalTextRun SCXW80899380 BCX8\">ny actions you can do in your other Visual Studio debugging sessions, such as view call stacks, view <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW80899380 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW80899380 BCX8\"> cache variables<\/span><span class=\"NormalTextRun SCXW80899380 BCX8\"> and target<\/span><span class=\"NormalTextRun SCXW80899380 BCX8\">s<\/span><span class=\"NormalTextRun SCXW80899380 BCX8\">, set breakpoints on <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW80899380 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW80899380 BCX8\"> exceptions<\/span><span class=\"NormalTextRun SCXW80899380 BCX8\">, <\/span><span class=\"NormalTextRun SCXW80899380 BCX8\">and <\/span><span class=\"NormalTextRun SCXW80899380 BCX8\">set watches on variables<\/span><span class=\"NormalTextRun SCXW80899380 BCX8\">.<\/span><\/span><span class=\"EOP SCXW80899380 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-debugger.png\"><img decoding=\"async\" class=\"size-full wp-image-245688 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-debugger.png\" alt=\"A screenshot of the CMake debugger in action\" width=\"1012\" height=\"796\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-debugger.png 1012w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-debugger-300x236.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-debugger-768x604.png 768w\" sizes=\"(max-width: 1012px) 100vw, 1012px\" \/><\/a><\/p>\n<h3>CMake Targets View Improvements<\/h3>\n<p><span class=\"TextRun SCXW178013913 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW178013913 BCX8\">The <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW178013913 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW178013913 BCX8\"> Targets View in Visual Studio can be helpful to <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW178013913 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW178013913 BCX8\"> users to have <\/span><span class=\"NormalTextRun SCXW178013913 BCX8\">a different way<\/span><span class=\"NormalTextRun SCXW178013913 BCX8\"> to visual<\/span><span class=\"NormalTextRun SCXW178013913 BCX8\">ize their project by the buildable targets rather than a traditional folder structure. <\/span><span class=\"NormalTextRun CommentStart SCXW178013913 BCX8\">Users can switch to the <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW178013913 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW178013913 BCX8\"> Targets View easier than ever <\/span><span class=\"NormalTextRun SCXW178013913 BCX8\">when right-clicking in <\/span><span class=\"NormalTextRun SCXW178013913 BCX8\">your<\/span><span class=\"NormalTextRun SCXW178013913 BCX8\"> Solution Explorer<\/span><span class=\"NormalTextRun SCXW178013913 BCX8\"> in a <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW178013913 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW178013913 BCX8\"> project<\/span><span class=\"NormalTextRun SCXW178013913 BCX8\">.<\/span><\/span><span class=\"EOP SCXW178013913 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-245689 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-targets-switch.png\" alt=\"Option to switch to CMake Targets View\" width=\"991\" height=\"881\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-targets-switch.png 991w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-targets-switch-300x267.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-targets-switch-768x683.png 768w\" sizes=\"(max-width: 991px) 100vw, 991px\" \/><\/p>\n<p><span class=\"TextRun SCXW38970144 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW38970144 BCX8\">Additionally, it can be found at <em>View &gt; <\/em><\/span><em><span class=\"NormalTextRun SpellingErrorV2Themed SCXW38970144 BCX8\">CMake<\/span><\/em><span class=\"NormalTextRun SCXW38970144 BCX8\"><em> Targets<\/em> at any point in a <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW38970144 BCX8\">CMake<\/span><span class=\"NormalTextRun SCXW38970144 BCX8\"> project.<\/span><\/span><span class=\"EOP SCXW38970144 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-targets-dropdown.png\"><img decoding=\"async\" class=\"size-large wp-image-245691 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-targets-dropdown-361x1024.png\" alt=\"Option to select CMake Targets from dropdown\" width=\"361\" height=\"1024\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-targets-dropdown-361x1024.png 361w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-targets-dropdown-106x300.png 106w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/cmake-targets-dropdown.png 390w\" sizes=\"(max-width: 361px) 100vw, 361px\" \/><\/a><\/p>\n<p><span data-contrast=\"auto\">From the Targets View, you\u2019ll be able to see the list of all your buildable targets, with options to build or debug from here.<\/span> <span data-contrast=\"auto\">You will only see the folders with buildable executables, making it easier than ever to navigate to your desired targets.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/Simplified-CMake-Targets-View.png\"><img decoding=\"async\" class=\"size-full wp-image-245692 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/Simplified-CMake-Targets-View.png\" alt=\"CMake Targets View \" width=\"400\" height=\"465\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/Simplified-CMake-Targets-View.png 400w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/10\/Simplified-CMake-Targets-View-258x300.png 258w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p><span class=\"TextRun SCXW153862806 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW153862806 BCX8\">You can define items to hide from this view that are not active targets you are working with through your <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW153862806 BCX8\">VSWorkspaceSettings.json<\/span><span class=\"NormalTextRun SCXW153862806 BCX8\"> in the<\/span><\/span><code><span class=\"TextRun SCXW153862806 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"> <span class=\"NormalTextRun SpellingErrorV2Themed SCXW153862806 BCX8\">CMakeTargetsViewExcludedItems<\/span> <\/span><\/code><span class=\"TextRun SCXW153862806 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW153862806 BCX8\">field. This field supports the following syntax and identifiers:<\/span><\/span><span class=\"EOP SCXW153862806 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">\u201cidentifiers\u201d<\/span><b><span data-contrast=\"none\">:<\/span><\/b><span data-contrast=\"none\">\u202f<code>CMakeProject<\/code><\/span><code><span data-contrast=\"none\">,\u202f<\/span><span data-contrast=\"none\">CMakeTarget<\/span><span data-contrast=\"none\">,\u202f<\/span><span data-contrast=\"none\">CMakeReference<\/span><span data-contrast=\"none\">,<\/span><span data-contrast=\"none\">\u202fCMakeFolder<\/span><span data-contrast=\"none\">,\u202f<\/span><span data-contrast=\"none\">CMakeFile<\/span><\/code><span data-contrast=\"none\">.<\/span><span data-ccp-props=\"{&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">Syntax for the<code>\u202f<\/code><\/span><code><span data-contrast=\"none\">CMakeTargetsViewExcludedItems<\/span><\/code><span data-contrast=\"none\">\u202fis the following<\/span><span data-contrast=\"none\">:\u202f<\/span><code><span data-contrast=\"none\">&lt;identifier&gt;:&lt;name&gt;<\/span><\/code><span data-ccp-props=\"{&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">This will specify any identifier with the specified name.<\/span><span data-ccp-props=\"{&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"none\">For example,\u202f<\/span><code><span data-contrast=\"none\">CMakeTarget:app<\/span><\/code><span data-contrast=\"none\">. Any CMake targets with the name \u201capp\u201d anywhere in the CMake Targets View will be excluded.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"none\">Additionally, if you want to specify specific items to be excluded, you can use a<\/span><span data-contrast=\"none\">\u202f <code>|<\/code> \u202f<\/span><span data-contrast=\"none\">to chain declarations together<code>:<\/code><\/span><code><span data-contrast=\"none\">&lt;identifier&gt;:&lt;name&gt;|&lt;identifier&gt;:&lt;name&gt;...<\/span><span data-ccp-props=\"{&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/code><\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"none\">For example,\u202f<\/span><code><span data-contrast=\"none\">CMakeProject:thirdPartyDependency|CMakeTarget:irrelevantThirdParty<\/span><span data-contrast=\"none\">.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/code><\/li>\n<\/ul>\n<p><span data-contrast=\"none\">Example usage in a VSWorkspaceSettings.json:<\/span><\/p>\n<pre><span class=\"EOP SCXW171489182 BCX8\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\"><span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW171489182 BCX8\" data-ccp-charstyle=\"pun\" data-ccp-charstyle-defn=\"{&quot;ObjectId&quot;:&quot;be55c42b-bb3f-490a-a548-6141e9a8ee43|72&quot;,&quot;ClassId&quot;:1073872969,&quot;Properties&quot;:[469775450,&quot;pun&quot;,201340122,&quot;1&quot;,469778129,&quot;pun&quot;,335572020,&quot;1&quot;,134234073,&quot;true&quot;,134234074,&quot;true&quot;,134233614,&quot;true&quot;,469778324,&quot;Default Paragraph Font&quot;]}\">{<\/span><\/span> <span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW171489182 BCX8\" data-ccp-charstyle=\"pln\">\u202f<\/span> <\/span><span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\" data-ccp-charstyle-defn=\"{&quot;ObjectId&quot;:&quot;be55c42b-bb3f-490a-a548-6141e9a8ee43|75&quot;,&quot;ClassId&quot;:1073872969,&quot;Properties&quot;:[469775450,&quot;str&quot;,201340122,&quot;1&quot;,469778129,&quot;str&quot;,335572020,&quot;1&quot;,134234073,&quot;true&quot;,134234074,&quot;true&quot;,134233614,&quot;true&quot;,469778324,&quot;Default Paragraph Font&quot;]}\">\"<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">CMakeTargetsViewExcludedItems<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">\"<\/span><\/span><span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"pun\">:<\/span><\/span> <span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"pun\">[<\/span><\/span> <span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"pln\">\u202f\u202f\u202f <\/span><\/span><span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">\"<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">CMakeTarget<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">:&lt;name&gt;<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">|<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">CMakeFile<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">:*\"<\/span><\/span><span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"pun\">,<\/span><\/span> <span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">\"<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">CMakeTarget<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">&lt;name&gt;<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">|<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">*<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">|<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">CMakeFile<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">:*\"<\/span><\/span><span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"pun\">,<\/span><\/span> <span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">\"<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SpellingErrorHighlight SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">CMakeTarget<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">:&lt;name&gt;<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">|<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">*<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">|<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">*<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">|<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">CMakeFile<\/span><span class=\"NormalTextRun SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">:*<\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW171489182 BCX8\" data-ccp-charstyle=\"str\">\"<\/span><\/span> <span class=\"TextRun SCXW171489182 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW171489182 BCX8\" data-ccp-charstyle=\"pun\">}<\/span><\/span>\u00a0\r\n\r\n<\/span><\/pre>\n<h3>Wrap Up<\/h3>\n<p><span data-contrast=\"auto\">We appreciate the time you\u2019ve spent reporting issues\/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via<\/span><span data-contrast=\"auto\">\u202f<\/span><a href=\"https:\/\/developercommunity.visualstudio.com\/home%22%20\/t%20%22_blank\"><span data-contrast=\"none\">Developer Community<\/span><\/a><span data-contrast=\"auto\">: report any bugs or issues via<\/span><span data-contrast=\"auto\">\u202f<\/span><a href=\"https:\/\/learn.microsoft.com\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio?view=vs-2022\"><span data-contrast=\"none\">report a problem<\/span><\/a><span data-contrast=\"auto\">\u202f<\/span><span data-contrast=\"auto\">and<\/span><span data-contrast=\"auto\">\u202f<\/span><a href=\"https:\/\/developercommunity.microsoft.com\/VisualStudio\/suggest\"><span data-contrast=\"none\">share your suggestions<\/span><\/a><span data-contrast=\"auto\">\u202f<\/span><span data-contrast=\"auto\">for new features or improvements to existing ones.<\/span><span data-contrast=\"auto\">\u202f\u202f<\/span><span data-contrast=\"auto\">\u202f\u202f<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Stay connected with the Visual Studio team by following us on <\/span><a href=\"https:\/\/www.youtube.com\/@visualstudio\"><span data-contrast=\"none\">YouTube<\/span><\/a><span data-contrast=\"auto\">, <\/span><a href=\"https:\/\/twitter.com\/VisualStudio\"><span data-contrast=\"none\">Twitter<\/span><\/a><span data-contrast=\"auto\">, <\/span><a href=\"https:\/\/www.linkedin.com\/showcase\/microsoft-visual-studio\/\"><span data-contrast=\"none\">LinkedIn<\/span><\/a><span data-contrast=\"auto\">, <\/span><a href=\"https:\/\/www.twitch.tv\/visualstudio\"><span data-contrast=\"none\">Twitch<\/span><\/a><span data-contrast=\"auto\"> and on <\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/?view=vs-2022\"><span data-contrast=\"none\">Microsoft Learn<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-contrast=\"auto\">\u202f<\/span><span data-contrast=\"auto\">\u202f<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio has native CMake integration that allows C++ users to build and develop using CMake and supports their unique needs. CMake is a cross-platform build tool for C++ and with Visual Studio\u2019s latest tools, users can be more productive when it comes to configuring with CMake. To learn more about Visual Studio\u2019s CMake integration, [&hellip;]<\/p>\n","protected":false},"author":85413,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[],"class_list":["post-245682","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio"],"acf":[],"blog_post_summary":"<p>Visual Studio has native CMake integration that allows C++ users to build and develop using CMake and supports their unique needs. CMake is a cross-platform build tool for C++ and with Visual Studio\u2019s latest tools, users can be more productive when it comes to configuring with CMake. To learn more about Visual Studio\u2019s CMake integration, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/245682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/85413"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=245682"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/245682\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=245682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=245682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=245682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}