autogen_better_graph_multi_config
启用该布尔属性后,CMake
将生成更多按配置划分的目标。因此,多配置生成器的依赖关系图将更加准确,并可避免一些重新编译。
自 Qt 6.8 起,该属性默认为启用。对于旧版本,需要手动启用才能使用。不过,在 Qt 6.8 中,qt_extract_metatypes和qt_add_qml_module已更新为支持AUTOGEN_BETTER_GRAPH_MULTI_CONFIG
,因此您将会出现编译错误,除非您修补旧版本的 Qt 以支持它。
要全局设置该属性,请使用以下命令:
set(CMAKE_AUTOGEN_BETTER_GRAPH_MULTI_CONFIG ON)
或在目标上设置:
set_target_properties(app PROPERTIES AUTOGEN_BETTER_GRAPH_MULTI_CONFIG ON)
更多信息,请参阅AUTOGEN_BETTER_GRAPH_MULTI_CONFIG。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.