We’re excited to announce improved CMake and Ninja support in Visual Studio 15.3 Preview 2. In this preview, we have updated CMake from version 3.7.2 to version 3.8 and added improved support for the CMake Ninja generator. Additionally, this preview includes several fixes for community reported bugs.
Please download the previewand 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.
We are trying to keep the version of CMake that is included in Visual Studio fresh as possible so you can use the latest and greatest features in your projects. To achieve that goal, we have upgraded the internal version of CMake the Visual Studio uses from CMake 3.7.2 to CMake 3.8.
You can find the full lists of enhancements in the CMake 3.8 release notesat cmake.org.
In thelast preview we introduced support for the Ninja generator. Visual Studio now supports targeting 64-bit systems as well as 32-bit. The Ninja generator is now selected by default when you create a new CMakeSettings.json:
{ // See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file. "configurations": [ { "name": "x86-Debug", "generator": "Ninja", "configurationType" : "Debug", "referenceContexts": [ "msvc_x86" ], "buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "-v", "ctestCommandArgs": "" }, { "name": "x86-Release", "generator": "Ninja", "configurationType" : "RelWithDebInfo", "referenceContexts": [ "msvc_x86" ], "buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "-v", "ctestCommandArgs": "" }, { "name": "x64-Debug", "generator": "Ninja", "configurationType" : "Debug", "referenceContexts": [ "msvc_x64" ], "buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "-v", "ctestCommandArgs": "" }, { "name": "x64-Release", "generator": "Ninja", "configurationType" : "RelWithDebInfo", "referenceContexts": [ "msvc_x64" ], "buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "-v", "ctestCommandArgs": "" } ]}
To update an existing CMakeSettings.json file to use Ninja to build a 64-bit binary, simply update the the generator and referenceContexts. Or if you haven’t heavily customized it you can just delete the existing file and let Visual Studio generate a new one for you. It will default to the Ninja generator for all builds.
You gave us feedback and we listened. Visual Studio 2017 15.3 includes several improvements and addresses bugs reported by the community. The following issues have been fixed as of 2017 15.3 Preview 3:
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 viaReport 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!