覆盖项目的 CMake 设置

覆盖当前项目的 CMake 设置:

  1. 转到Projects >Project Settings >CMake

    项目的 CMake 设置

  2. 清除Use global settings
  3. 为项目配置 CMake。

您的选择覆盖在 "首选项" >CMake >General 中设置的值。

设置阅读更多
自动运行 CMake在编辑项目中的CMakeLists.txt 配置文件时,运行 CMake 以刷新项目信息。此外,在构建项目时也会刷新项目信息。查看 CMake 项目内容
软件包管理器自动设置设置Conanvcpkg软件包管理器,以便与 CMake 配合使用。与软件包管理器一起使用 CMake
使用初始参数重新配置前询问当您选择Re-configure with Initial Variables 时,先询问再行动。使用初始变量重新配置
重新加载 CMake 预置前询问当您选择Build >Reload CMake Presets.CMake 预置
显示源代码组文件夹内的子文件夹Projects 视图中隐藏子文件夹名称,并根据源组排列文件。在项目视图中隐藏子文件夹名称
默认显示高级选项Initial ConfigurationCurrent Configuration 中默认显示所有 CMake 变量。查看高级变量
为 CMake 配置和构建操作使用连接点在 Windows 中,为 CMake 配置、编译和安装操作使用连接点。在 Windows 上使用连接点

您可以将这些首选项设置为CMake 预设CMakeLists.txt.shared文件。

另请参阅 如何:使用 CMakeCMake配置项目构建

Copyright © The Qt Company Ltd. and other contributors. 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.