{"id":22275,"date":"2019-01-24T10:02:04","date_gmt":"2019-01-24T18:02:04","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/?p=22275"},"modified":"2019-04-11T18:03:54","modified_gmt":"2019-04-11T18:03:54","slug":"introducing-the-new-cmake-project-settings-ui","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/introducing-the-new-cmake-project-settings-ui\/","title":{"rendered":"Introducing the New CMake Project Settings UI"},"content":{"rendered":"<p>Visual Studio 2019 Preview 2 introduces a new CMake Project Settings Editor to help you more easily configure your CMake projects in Visual Studio. The editor provides an alternative to modifying the CMakeSettings.json file directly and allows you to create and manage your CMake configurations.<\/p>\n<p>If you\u2019re just getting started with CMake in Visual Studio, head over to our <a href=\"https:\/\/aka.ms\/cmake\">CMake Support in Visual Studio introductory page<\/a>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/01\/fullEditor11.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-22345\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/01\/fullEditor11.jpg\" alt=\"The new CMake Project Settings Editor\" width=\"1349\" height=\"780\" \/><\/a><\/p>\n<p>The goal of this editor is to simplify the experience of configuring a CMake project by grouping and promoting commonly used settings, hiding advanced settings, and making it easier to edit CMake variables. This is the first preview of this new UI so we will continue to improve it based on your feedback.<\/p>\n<h2>Open the editor<\/h2>\n<p>The CMake Project Settings Editor opens by default when you select \u201cManage Configurations\u2026\u201d from the configuration drop-down menu at the top of the screen.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/01\/connectionManager1.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-22305 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/01\/connectionManager1.jpg\" alt=\"Open the CMake Project Settings Editor by selecting &quot;Manage Connections...&quot; from the configuration drop-down menu at the top of the screen.\" width=\"432\" height=\"143\" \/><\/a><\/p>\n<p>You can also right-click on CMakeSettings.json in the Solution Explorer and select \u201cEdit CMake Settings\u201d from the context menu. If you prefer to manage your configurations directly from the CMakeSettings.json file, you can click the link to \u201cEdit JSON\u201d in the top right-hand corner of the editor.<\/p>\n<h2>Configurations sidebar<\/h2>\n<p><span class=\"TextRun SCXW29744793\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW29744793\">The <\/span><\/span><span class=\"TextRun SCXW29744793\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun CommentStart SCXW29744793\">left <\/span><\/span><span class=\"TextRun SCXW29744793\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW29744793\">side <\/span><\/span><span class=\"TextRun SCXW29744793\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW29744793\">of the editor contains a configurations sidebar where you can easily toggle between your existing configurations, add a new configuration, and remove configurations. You can also now <\/span><\/span><strong><span class=\"TextRun SCXW29744793\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW29744793\">clone<\/span><\/span><\/strong><span class=\"TextRun SCXW29744793\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW29744793\"> an existing configuration so that the new <\/span><\/span><span class=\"TextRun SCXW29744793\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun CommentStart SCXW29744793\">configuration <\/span><\/span><span class=\"TextRun SCXW29744793\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW29744793\">inherits all properties set by the original.\u00a0<\/span><\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/01\/configSidebar1.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-22315\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/01\/configSidebar1.jpg\" alt=\"The configurations sidebar is on the left side of the editor.\" width=\"249\" height=\"162\" \/><\/a><\/p>\n<h2>Sections of the editor<\/h2>\n<p>The editor contains four sections: General, Command Arguments, CMake Variables and Cache, and Advanced. The General, Command Arguments, and Advanced sections provide a user interface for properties exposed in the CMakeSettings.json file. The Advanced section is hidden by default and can be expanded by clicking the link to \u201cShow advanced settings\u201d at the bottom of the editor.<\/p>\n<p>The <b>CMake Variables and Cache <\/b>section provides a new way for you to edit CMake variables. You can click \u201cSave and Generate CMake Cache to Load Variables\u201d to generate the CMake cache and populate a table with all the CMake cache variables available for you to edit. Advanced variables (per the CMake GUI) are hidden by default. You can check \u201cShow Advanced Variables\u201d to show all cache variables or use the search functionality to filter CMake variables by name.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/01\/cmakeVariables1.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-22325 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/01\/cmakeVariables1.jpg\" alt=\"The CMake Variables and Cache section provides a new way for you to edit CMake variables.\" width=\"950\" height=\"321\" \/><\/a><\/p>\n<p>You can change the value of any CMake variable by editing the \u201cValue\u201d column of the table. Modified variables are automatically saved to CMakeSettings.json.<\/p>\n<h2>Linux configurations<\/h2>\n<p>The CMake Project Settings Editor also provides support for Linux configurations. If you are targeting a remote Linux machine, the editor will expose properties specific to a remote build and link to the Connection Manager, where you can add and remove connections to remote machines.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/01\/linuxConfig1.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-22335 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/01\/linuxConfig1.jpg\" alt=\"CMake Settings support for Linux configurations. \" width=\"1058\" height=\"512\" \/><\/a><\/p>\n<h2>Give us your feedback!<\/h2>\n<p>We\u2019d love for you to <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\">download Visual Studio 2019<\/a> and give it a try. As always, we welcome your feedback. We can be reached via the comments below or via email (<a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a>). If you encounter other problems with Visual Studio or MSVC or have a suggestion please let us know through <b>Help &gt; Send Feedback &gt; Report A Problem \/ Provide a Suggestion <\/b>in the product, or via <a href=\"https:\/\/developercommunity.visualstudio.com\/content\/idea\/post.html?space=62\">Developer Community<\/a>. You can also find us on Twitter (<a href=\"https:\/\/twitter.com\/visualc\">@VisualC<\/a>) and Facebook (<a href=\"https:\/\/www.facebook.com\/msftvisualcpp\">msftvisualcpp<\/a>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2019 Preview 2 introduces a new CMake Project Settings Editor to help you more easily configure your CMake projects in Visual Studio. The editor provides an alternative to modifying the CMakeSettings.json file directly and allows you to create and manage your CMake configurations. If you\u2019re just getting started with CMake in Visual Studio, [&hellip;]<\/p>\n","protected":false},"author":2953,"featured_media":22747,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[270,266,279,230,269],"tags":[],"class_list":["post-22275","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcement","category-cmake","category-linux","category-new-feature","category-openfolder"],"acf":[],"blog_post_summary":"<p>Visual Studio 2019 Preview 2 introduces a new CMake Project Settings Editor to help you more easily configure your CMake projects in Visual Studio. The editor provides an alternative to modifying the CMakeSettings.json file directly and allows you to create and manage your CMake configurations. If you\u2019re just getting started with CMake in Visual Studio, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/22275","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\/2953"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=22275"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/22275\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/22747"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=22275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=22275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=22275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}