CMake 3.9现在可以创建“ autogen” Visual Studio中的项目? [英] CMake 3.9 now creates "autogen" projects in Visual Studio?

查看:346
本文介绍了CMake 3.9现在可以创建“ autogen” Visual Studio中的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用CMake,Qt和Visual Studio。通过将 AUTOMOC ON 传递到 add_library ,我们的许多项目都配置为运行automoc。

We're using CMake, Qt, and Visual Studio. Many of our projects are configured to run automoc, via passing AUTOMOC ON to add_library.

我们最近更新到了CMake 3.9.1,Visual Studio现在为每个自动库显示了一个附加项目。例如,我们现在在解决方案中有一个 Core项目和一个 Core_autogen项目。

We recently updated to CMake 3.9.1, and Visual Studio now shows an additional project for every automoc'd library. For example, we now have a "Core" project and a "Core_autogen" project in our solution.

(这同时在VS2015和VS2017中以及Qt 5.8和5.9.1)

(this occurs in both VS2015 and VS2017, and both Qt 5.8 and 5.9.1)

这会带来一些烦人的后果:

This has a few annoying consequences:


  • 几乎翻倍项目的数量,增加了很多视觉上的混乱。

  • 通过UI构建单个项目时,Automoc不再运行,这可能会在调试特定项目的构建问题时导致细微的错误。 。

有人知道是否有办法为自发电恢复以前的CMake行为?

Does anyone know if there's a way to restore the previous CMake behavior for autogen?

或者禁止这样做,至少可以减少autogen项目的视觉混乱?

Or barring that, some way to at least reduce the visual clutter of the autogen projects?

推荐答案

这是一个回归,应在CMake 3.10中修复。
CMake错误报告在这里: https://gitlab.kitware.com / cmake / cmake / issues / 17205

This is a regression and supposed to be fixed in CMake 3.10. The CMake bug report is here: https://gitlab.kitware.com/cmake/cmake/issues/17205

这篇关于CMake 3.9现在可以创建“ autogen” Visual Studio中的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆