{"id":16775,"date":"2017-09-14T15:33:10","date_gmt":"2017-09-14T22:33:10","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/?p=16775"},"modified":"2019-02-18T17:48:18","modified_gmt":"2019-02-18T17:48:18","slug":"cmake-support-in-visual-studio-cmake-3-9-linux-targeting-feedback","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/cmake-support-in-visual-studio-cmake-3-9-linux-targeting-feedback\/","title":{"rendered":"CMake support in Visual Studio \u2013 CMake 3.9, Linux targeting, feedback"},"content":{"rendered":"<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/c\/2017\/10\/13\/visual-studio%E6%94%AF%E6%8C%81cmake-%E5%8C%85%E6%8B%ACcmake-3-9%E7%9A%84%E6%9B%B4%E6%96%B0%EF%BC%8C%E6%94%AF%E6%8C%81linux%E7%B3%BB%E7%BB%9F%E5%B7%B2%E5%8F%8A%E5%AF%B9%E4%B8%80%E4%BA%9B%E5%8F%8D\/\">\u70b9\u8fd9\u91cc\u770b\u4e2d\u6587\u7248<\/a><\/p>\n<p><a href=\"https:\/\/www.visualstudio.com\/vs\/preview\/\">Visual Studio 2017 15.4 Preview 2<\/a>\u00a0is now available and includes enhancements to Visual Studio\u2019s CMake tools.\u00a0 The latest preview upgrades CMake to version 3.9, includes better support for independent CMakeLists, and supports targeting Linux directly.<\/p>\n<p>Please check out the preview and try out the latest CMake features.\u00a0 If you are just getting started with CMake, follow the link to\u00a0<a href=\"https:\/\/aka.ms\/cmake\">learn more about CMake support in Visual Studio<\/a>.\u00a0 We are looking forward to your feedback.<\/p>\n<h3>CMake Tools Upgraded to CMake 3.9<\/h3>\n<p>You can find the full lists of enhancements in the <a href=\"https:\/\/cmake.org\/cmake\/help\/v3.9\/release\/3.9.html\">CMake 3.9 release notes<\/a>.<\/p>\n<h3>Better Support for Folders Containing Multiple Independent CMakeLists<\/h3>\n<p>The latest preview has improved support for folders that contain multiple independent CMake projects. \u00a0When you open a folder with independent projects, all targets in your CMake projects should be detected.<\/p>\n<p>This feature does have some limitations in the preview.\u00a0 For instance, if there is a CMakeLists in the root folder, independent CMakeLists in subfolders may not be properly detected.\u00a0 Please let us know if this will negatively impact your projects. \u00a0Until then, you can work around this limitation by opening the subfolder directly.<\/p>\n<h3>CMake Support for Linux<\/h3>\n<p>Visual Studio now supports <a href=\"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2017\/08\/25\/visual-c-for-linux-development-with-cmake\/\">targeting Linux directly with CMake<\/a>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/hellolinuxcmake.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/hellolinuxcmake.png\" alt=\"Target Linux or Windows with Visual Studio and CMake.\" width=\"809\" height=\"610\" class=\"alignnone size-full wp-image-16685\" \/><\/a><\/p>\n<p>This feature allows you to open your Linux projects without modification, edit on Windows with full IntelliSense, and build and debug on a remote Linux target.\u00a0 Additionally, Visual Studio handles the connection to the remote target for you, so you don\u2019t need to worry about setting up SSH tunnels.\u00a0 This should make cross-platform development a breeze, because you can switch between targeting Windows and Linux by switching configurations in the dropdown.\u00a0 Check out the link above if you want to learn more.<\/p>\n<h3>Bugfixes and Improvements<\/h3>\n<p>You gave us feedback and we listened.\u00a0 Visual Studio 2017 15.4 Preview 1 includes several improvements and addresses bugs reported by the community.\u00a0 The following issues have been fixed in the latest preview:<\/p>\n<ul>\n<li>Cannot build solution with CMake because generator could not be not found.\n<em>Developer Community: <\/em><a href=\"https:\/\/developercommunity.visualstudio.com\/content\/problem\/98850\/vs-2017-cant-build-solution-with-cmake-generator-n.html\">98850<\/a><\/li>\n<li>CMakeSettings.json \u00a0cannot be placed in the \u2018.vs\u2019 folder.\n<em>Developer Community: <\/em><a href=\"https:\/\/developercommunity.visualstudio.com\/content\/problem\/81812\/cmakesettingsjson-should-be-generated-in-the-vs-fo.html\">81812<\/a><\/li>\n<li>No way to launch\/debug a DLL from CMake \u201cOpen Folder.\u201d\n<em>Developer Community: <\/em><a href=\"https:\/\/developercommunity.visualstudio.com\/content\/problem\/82176\/no-way-to-launchdebug-a-dll-from-cmake-open-folder.html\">82176<\/a><\/li>\n<li>Launch.vs.json doesn&#8217;t support properly support environment variables.\n<em>Developer Community: <\/em><a href=\"https:\/\/developercommunity.visualstudio.com\/content\/problem\/81798\/launchvsjson-doesnt-support-environment-variables.html\">81798<\/a><\/li>\n<li>CMAKE_VS_DEVENV_COMMAND variable is not set.\n<em>Developer Community: <\/em><a href=\"https:\/\/developercommunity.visualstudio.com\/content\/problem\/75609\/cmake-vs-devenv-command-unset-in-vs-bundled-cmake.html\">75609<\/a><\/li>\n<\/ul>\n<h3>Send Us Feedback<\/h3>\n<p>To try out the latest and greatest CMake features and give us some early feedback, please download and install the latest\u00a0<a href=\"https:\/\/www.visualstudio.com\/vs\/preview\/\">Visual Studio 2017 Preview<\/a>.\u00a0 As always, we welcome your feedback.\u00a0 Feel free to send any comments through e-mail at\u00a0<a href=\"mailto:cmake@microsoft.com\">cmake@microsoft.com<\/a>, through\u00a0<a href=\"https:\/\/twitter.com\/visualc\">Twitter @visualc<\/a>, or Facebook at\u00a0<a href=\"https:\/\/www.facebook.com\/Microsoft-Visual-Cpp-222043184527264\/\">Microsoft Visual Cpp<\/a>.<\/p>\n<p>If you encounter other problems with Visual Studio 2017 please let us know via\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio-2017\">Report a Problem<\/a>, which is available in both the installer and the IDE itself. \u00a0For suggestions, let us know through\u00a0<a href=\"https:\/\/visualstudio.uservoice.com\/forums\/121579-visual-studio-2015\/category\/30937-languages-c\">UserVoice<\/a>. We look forward to your feedback!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u70b9\u8fd9\u91cc\u770b\u4e2d\u6587\u7248 Visual Studio 2017 15.4 Preview 2\u00a0is now available and includes enhancements to Visual Studio\u2019s CMake tools.\u00a0 The latest preview upgrades CMake to version 3.9, includes better support for independent CMakeLists, and supports targeting Linux directly. Please check out the preview and try out the latest CMake features.\u00a0 If you are just getting started with [&hellip;]<\/p>\n","protected":false},"author":326,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[266,269],"tags":[8,140,252,233,308,6,309,299],"class_list":["post-16775","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cmake","category-openfolder","tag-announcement","tag-c","tag-cmake","tag-cross-platform","tag-existing-code","tag-ide","tag-import","tag-visual-studio-2017"],"acf":[],"blog_post_summary":"<p>\u70b9\u8fd9\u91cc\u770b\u4e2d\u6587\u7248 Visual Studio 2017 15.4 Preview 2\u00a0is now available and includes enhancements to Visual Studio\u2019s CMake tools.\u00a0 The latest preview upgrades CMake to version 3.9, includes better support for independent CMakeLists, and supports targeting Linux directly. Please check out the preview and try out the latest CMake features.\u00a0 If you are just getting started with [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/16775","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\/326"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=16775"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/16775\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=16775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=16775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=16775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}