{"id":24088,"date":"2019-04-15T16:42:55","date_gmt":"2019-04-15T16:42:55","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=24088"},"modified":"2019-04-15T16:42:55","modified_gmt":"2019-04-15T16:42:55","slug":"in-editor-documentation-for-cmake-in-visual-studio","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/in-editor-documentation-for-cmake-in-visual-studio\/","title":{"rendered":"In-Editor Documentation for CMake in Visual Studio"},"content":{"rendered":"<p>Visual Studio 2019 version 16.1 Preview 1\u00a0introduces in-editor documentation for CMake <a href=\"https:\/\/cmake.org\/cmake\/help\/v3.14\/manual\/cmake-commands.7.html\" target=\"_blank\" rel=\"noopener noreferrer\">commands<\/a>,\u00a0<a class=\"Hyperlink SCXW75625725 BCX0\" href=\"https:\/\/cmake.org\/cmake\/help\/latest\/manual\/cmake-variables.7.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"TextRun Underlined SCXW75625725 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW75625725 BCX0\">variables<\/span><\/span><\/a><span class=\"TextRun SCXW75625725 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW75625725 BCX0\">, and\u00a0<\/span><\/span><a class=\"Hyperlink SCXW75625725 BCX0\" href=\"https:\/\/cmake.org\/cmake\/help\/latest\/manual\/cmake-properties.7.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"TextRun Underlined SCXW75625725 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW75625725 BCX0\">properties<\/span><\/span><\/a>. You can now leverage IntelliSense autocompletion<span class=\"TextRun SCXW75625725 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentStart SCXW75625725 BCX0\">\u00a0<\/span><\/span><span class=\"TextRun SCXW75625725 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW75625725 BCX0\">and\u00a0<\/span><\/span><span class=\"TextRun SCXW75625725 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentStart SCXW75625725 BCX0\">quick info tooltips\u00a0<\/span><\/span><span class=\"TextRun SCXW75625725 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW75625725 BCX0\">when editing a CMakeLists.txt file, which will save you time spent outside of the IDE referencing documentation and make the process less error-prone. If you are just getting started with our native support for CMake, head over to our\u00a0<\/span><\/span><a class=\"Hyperlink SCXW75625725 BCX0\" href=\"https:\/\/docs.microsoft.com\/en-us\/cpp\/build\/cmake-projects-in-visual-studio?view=vs-2019\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"TextRun Underlined SCXW75625725 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW75625725 BCX0\">CMake Support in Visual Studio<\/span><\/span><\/a><span class=\"TextRun SCXW75625725 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW75625725 BCX0\">\u00a0<\/span><\/span><span class=\"TextRun SCXW75625725 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentStart SCXW75625725 BCX0\">introductory page<\/span><\/span><span class=\"TextRun SCXW75625725 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW75625725 BCX0\">. You can use CMake to <a href=\"https:\/\/docs.microsoft.com\/en-us\/cpp\/linux\/cmake-linux-project?view=vs-2019\">target multiple platforms<\/a> from the comfort of a single IDE.\u00a0<\/span><\/span><\/p>\n<h4><span class=\"TextRun SCXW183621675 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW183621675 BCX0\">Quick info<\/span><\/span><span class=\"EOP SCXW183621675 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><span class=\"TextRun SCXW213605566 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW213605566 BCX0\">Visual Studio now provides tooltips for CMake commands, variables, and properties based on\u00a0<\/span><\/span><a class=\"Hyperlink SCXW213605566 BCX0\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.14\/index.html\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"TextRun Underlined SCXW213605566 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW213605566 BCX0\">official CMake documentation<\/span><\/span><\/a><span class=\"TextRun SCXW213605566 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW213605566 BCX0\">. The tooltip appears when hovering over a command, variable, or property name and includes the definition (with optional arguments) and a quick description. Below is the quick info seen when hovering over the\u00a0<code><span class=\"lang:default decode:true crayon-inline \">add_subdirectory<\/span><\/code>\u00a0 <\/span><\/span><span class=\"TextRun SCXW213605566 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW213605566 BCX0\">project command.<\/span><\/span><span class=\"EOP SCXW213605566 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-24089 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/04\/QuickInfo_Command.png\" alt=\"Quick Info for &quot;add_subdirectory&quot; CMake command\" width=\"483\" height=\"107\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/04\/QuickInfo_Command.png 483w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/04\/QuickInfo_Command-300x66.png 300w\" sizes=\"(max-width: 483px) 100vw, 483px\" \/><\/p>\n<h4><span class=\"TextRun SCXW183621675 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW183621675 BCX0\">IntelliSense completion\u00a0<\/span><\/span><\/h4>\n<p><span class=\"EOP SCXW183621675 BCX0\" style=\"font-size: 12pt;\" data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:240}\"><span class=\"TextRun SCXW131977137 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW131977137 BCX0\">Visual Studio<\/span><\/span><span class=\"TextRun SCXW131977137 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentStart SCXW131977137 BCX0\">\u00a02019 version\u00a0<\/span><\/span><span class=\"TextRun SCXW131977137 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW131977137 BCX0\">16.1 also improves completion behavior in CMakeLists.txt and provides suggestions for documented CMake commands, variables, and properties. Below are the completion suggestions and tooltips provided when setting the CMAKE_CXX_STANDARD using the <code><span class=\"font:consolas lang:default highlight:0 decode:true crayon-inline \">set<\/span><\/code>\u00a0<\/span><\/span><span class=\"TextRun SCXW131977137 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW131977137 BCX0\">command and <code><span class=\"font:consolas lang:default highlight:0 decode:true crayon-inline\">CMAKE_CXX_STANDARD<\/span><\/code>\u00a0<\/span><\/span><span class=\"TextRun SCXW131977137 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW131977137 BCX0\">variable.\u00a0<\/span><\/span><span class=\"EOP SCXW131977137 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:240}\">\u00a0<\/span><\/span><\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-24091 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2019\/04\/CMake_Commands2.gif\" alt=\"Completion suggestions and tooltips provided when setting the CMAKE_CXX_STANDARD using the set\u00a0\u00a0command and CMAKE_CXX_STANDARD\u00a0\u00a0variable\" width=\"1423\" height=\"238\" \/><\/p>\n<h4><span class=\"TextRun SCXW183621675 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW183621675 BCX0\">Give us your feedback!<\/span><\/span><\/h4>\n<p><span class=\"TextRun SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW128939618 BCX0\">Thank you for taking the time to provide the feedback that we use to shape Visual Studio 2019 into the best developer environment f<\/span><\/span><span class=\"TextRun SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW128939618 BCX0\">or you. We\u2019d love for you to download\u00a0<\/span><\/span><a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/?utm_source=devcom&amp;utm_medium=landing-page&amp;utm_campaign=announcements\"><span class=\"FieldRange SCXW128939618 BCX0\"><span class=\"TextRun Underlined SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun CommentStart SCXW128939618 BCX0\">Visual Studio 2019 version 16.1 Preview 1<\/span><\/span><\/span><\/a><span class=\"TextRun SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW128939618 BCX0\">\u00a0<\/span><\/span><span class=\"TextRun SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW128939618 BCX0\">and give it a try. We can be reached via the comments below or via email (<\/span><\/span><a href=\"mailto:visualcpp@microsoft.com\"><span class=\"FieldRange SCXW128939618 BCX0\"><span class=\"TextRun Underlined SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW128939618 BCX0\">visualcpp@microsoft.com<\/span><\/span><\/span><\/a><span class=\"TextRun Underlined SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW128939618 BCX0\">)<\/span><\/span><span class=\"TextRun SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW128939618 BCX0\">. If you encounter other problems with Visual Studio or MSVC or have a suggestion, you can use the\u00a0<\/span><\/span><a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio?view=vs-2017\"><span class=\"FieldRange SCXW128939618 BCX0\"><span class=\"TextRun Underlined SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW128939618 BCX0\">Report a Problem<\/span><\/span><\/span><\/a><span class=\"TextRun SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW128939618 BCX0\">\u00a0tool in Visual Studio or head over to the\u00a0<\/span><\/span><a href=\"https:\/\/developercommunity.visualstudio.com\/spaces\/8\/index.html\"><span class=\"FieldRange SCXW128939618 BCX0\"><span class=\"TextRun Underlined SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW128939618 BCX0\">Visual Studio Developer Community<\/span><\/span><\/span><\/a><span class=\"TextRun SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW128939618 BCX0\">. You can also find us on Twitter (<\/span><\/span><a href=\"https:\/\/twitter.com\/visualc\"><span class=\"FieldRange SCXW128939618 BCX0\"><span class=\"TextRun Underlined SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW128939618 BCX0\">@VisualC<\/span><\/span><\/span><\/a><span class=\"TextRun SCXW128939618 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW128939618 BCX0\">).<\/span><\/span><span class=\"EOP SCXW128939618 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2019 version 16.1 Preview 1\u00a0introduces in-editor documentation for CMake commands,\u00a0variables, and\u00a0properties. You can now leverage IntelliSense autocompletion\u00a0and\u00a0quick info tooltips\u00a0when editing a CMakeLists.txt file, which will save you time spent outside of the IDE referencing documentation and make the process less error-prone. If you are just getting started with our native support for CMake, [&hellip;]<\/p>\n","protected":false},"author":2953,"featured_media":24089,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[270,266,279,230],"tags":[],"class_list":["post-24088","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcement","category-cmake","category-linux","category-new-feature"],"acf":[],"blog_post_summary":"<p>Visual Studio 2019 version 16.1 Preview 1\u00a0introduces in-editor documentation for CMake commands,\u00a0variables, and\u00a0properties. You can now leverage IntelliSense autocompletion\u00a0and\u00a0quick info tooltips\u00a0when editing a CMakeLists.txt file, which will save you time spent outside of the IDE referencing documentation and make the process less error-prone. If you are just getting started with our native support for CMake, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/24088","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=24088"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/24088\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/24089"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=24088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=24088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=24088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}