CMake support in Visual Studio – CMake 3.9, Linux targeting, feedback

Will Buik

点这里看中文版

Visual Studio 2017 15.4 Preview 2 is now available and includes enhancements to Visual Studio’s CMake tools.  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.  If you are just getting started with CMake, follow the link to learn more about CMake support in Visual Studio.  We are looking forward to your feedback.

CMake Tools Upgraded to CMake 3.9

You can find the full lists of enhancements in the CMake 3.9 release notes.

Better Support for Folders Containing Multiple Independent CMakeLists

The latest preview has improved support for folders that contain multiple independent CMake projects.  When you open a folder with independent projects, all targets in your CMake projects should be detected.

This feature does have some limitations in the preview.  For instance, if there is a CMakeLists in the root folder, independent CMakeLists in subfolders may not be properly detected.  Please let us know if this will negatively impact your projects.  Until then, you can work around this limitation by opening the subfolder directly.

CMake Support for Linux

Visual Studio now supports targeting Linux directly with CMake.

Target Linux or Windows with Visual Studio and CMake.

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.  Additionally, Visual Studio handles the connection to the remote target for you, so you don’t need to worry about setting up SSH tunnels.  This should make cross-platform development a breeze, because you can switch between targeting Windows and Linux by switching configurations in the dropdown.  Check out the link above if you want to learn more.

Bugfixes and Improvements

You gave us feedback and we listened.  Visual Studio 2017 15.4 Preview 1 includes several improvements and addresses bugs reported by the community.  The following issues have been fixed in the latest preview:

  • Cannot build solution with CMake because generator could not be not found. Developer Community: 98850
  • CMakeSettings.json  cannot be placed in the ‘.vs’ folder. Developer Community: 81812
  • No way to launch/debug a DLL from CMake “Open Folder.” Developer Community: 82176
  • Launch.vs.json doesn’t support properly support environment variables. Developer Community: 81798
  • CMAKE_VS_DEVENV_COMMAND variable is not set. Developer Community: 75609

Send Us Feedback

To try out the latest and greatest CMake features and give us some early feedback, please download and install the latest Visual Studio 2017 Preview.  As always, we welcome your feedback.  Feel free to send any comments through e-mail at cmake@microsoft.com, through Twitter @visualc, or Facebook at Microsoft Visual Cpp.

If you encounter other problems with Visual Studio 2017 please let us know via Report a Problem, which is available in both the installer and the IDE itself.  For suggestions, let us know through UserVoice. We look forward to your feedback!

0 comments

Discussion is closed.

Feedback usabilla icon