Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[原文发表地址] CMake support in Visual Studio – CMake 3.9, Linux targeting, feedback
[原文发表时间] 2017/9/14
Visual Studio 2017 15.4 Preview 2现在可用,包括对Visual Studio的CMake工具的增强。最新的预览将CMake升级到3.9版本,包括的更好地支持独立的CMakeLists,并支持直接定位Linux。
请查看预览并尝试使用最新的CMake功能。如果您刚刚开始使用CMake,请按照链接详细了解Visual Studio中的CMake支持。我们期待您的反馈。
您可以在CMake 3.9发行说明中找到关于增强功能的完整列表。
最新的预览改进了对包含多个独立CMake项目的文件夹的支持。当您打开一个独立项目的文件夹时, CMake项目中的所有目标都应该被检测到。
此功能在预览中确实有一些限制。例如,如果根文件夹中有CMakeLists,则可能无法正确检测到子文件夹中的独立CMakeLists。请让我们知道这是否会对您的项目产生负面影响。在此之前,您可以直接打开子文件夹来解决这个限制。
Visual Studio现在支持使用CMake直接定位Linux。
此功能允许您无需修改即可打开Linux项目,在Windows上使用完整的IntelliSense进行编辑,并在远程Linux目标上进行构建和调试。另外,Visual Studio解决了远程目标的链接问题,因此您不必担心设置SSH通道。这应该使跨平台开发变得轻而易举,因为您可以通过在下拉列表中切换配置来在Windows和Linux之间切换。如果您想了解更多信息,请查看使用CMake直接定位Linux。
你们给了我们反馈,我们听了。Visual Studio 2017 15.4预览1包含几个改进和解决社区报告的错误。 以下问题已在最新预览中修复:
无法使用CMake构建解决方案,因为无法找到生成器。
开发者社区:98850
CMakeSettings.json不能放在'.vs'文件夹中。
开发者社区:81812
无法从CMake“打开文件夹”启动/调试DLL。
开发者社区:82176
开发者社区:81798
开发者社区:75609
要尝试最新最好的CMake功能,并给我们一些早期的反馈意见,请下载并安装最新的Visual Studio 2017 Preview。和往常一样,我们欢迎您的反馈。 请通过电子邮件 cmake@microsoft.com,通过Twitter @visualc或Microsoft Visual Cpp的Facebook发送任何意见。
如果您遇到Visual Studio 2017的其他问题,请通过报告问题通知我们,该问题在安装程序和IDE本身都可用。有关建议,请通过UserVoice通知我们。我们期待您的反馈!
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in