使用解决方案文件夹时没有CMakePredefinedTargets

时间:2016-03-22 08:58:52

标签: visual-studio cmake

在CMake中使用VS解决方案文件夹时使用:

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_target_properties(MyProject PROPERTIES FOLDER "MyProjects")

我也自动启用了 CMakePredefinedTargets文件夹:

enter image description here

有没有办法避免这种行为?

重置PREDEFINED_TARGETS_FOLDER可以重命名该文件夹,但不能将其删除。为INSTALL等设置FOLDER属性似乎也没有效。

感谢。

1 个答案:

答案 0 :(得分:2)

修改:在查看CMake代码后,我非常确定您可以将Mar 9 13:56:54 SST-iPhone5S-Black kernel[0] <Debug>: AppleFairplayTextCrypterSession::fairplayOpen() failed, error -42017 Mar 9 13:56:54 SST-iPhone5S-Black backboardd[31] <Warning>: Unable to obtain a task name port right for pid 146: (os/kern) failure (5) Mar 9 13:56:54 SST-iPhone5S-Black com.apple.launchd[1] (UIKitApplication:com.abc.def[0xdfdd][146]) <Notice>: (UIKitApplication:com.abc.def[0xdfdd]) Exited: Killed: 9 Mar 9 13:56:54 SST-iPhone5S-Black com.apple.launchd[1] (UIKitApplication:com.abc.def[0xdfdd]) <Error>: (UIKitApplication:com.abc.def[0xdfdd]) assertion failed: 11D257: launchd + 99240 [802BC42B-7AAC-33FE-8B52-C441858B62B5]: 0x16 Mar 9 13:56:54 SST-iPhone5S-Black com.apple.launchd[1] (UIKitApplication:com.abc.def[0xdfdd]) <Error>: (UIKitApplication:com.abc.def[0xdfdd]) assertion failed: 11D257: launchd + 99240 [802BC42B-7AAC-33FE-8B52-C441858B62B5]: 0x16 Mar 9 13:56:54 SST-iPhone5S-Black backboardd[31] <Warning>: Could not set priority of [146] to 1, priority: No such process Mar 9 13:56:54 SST-iPhone5S-Black backboardd[31] <Warning>: Could not set priority of [146] to 0, priority: No such process Mar 9 13:56:54 SST-iPhone5S-Black com.apple.launchd[1] (UIKitApplication:com.abc.def[0xdfdd]) <Notice>: (UIKitApplication:com.abc.def[0xdfdd]) Throttling respawn: Will start in 2147483647 seconds Mar 9 13:56:54 SST-iPhone5S-Black backboardd[31] <Warning>: Application 'UIKitApplication:com.abc.def[0xdfdd]' exited abnormally with signal 9: Killed: 9 设置为PREDEFINED_TARGETS_FOLDER。我已经使用

测试了它并使用CMake 3.3.2和VS2015
""

预定义目标再次处于根级别。

并且,是的,如果全局USE_FOLDERS属性set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "") ,那么预定义的目标是硬连线的,始终在PREDEFINED_TARGETS_FOLDER文件夹中分组。因此,设置例如FOLDER属性。 ON没有帮助。

作为参考,请参阅cmGlobalVisualStudioGenerator.cxxINSTALL目标已明确停用此行为:

ALL_BUILD