CMake Qt 供应商预设
在CMakePresets.json
和CMakeUserPresets.json
中的vendor
部分指定Qt Creator 首选项。
CMake 配置预设
下表总结了可用的预设。
预设 | 说明 | 读取更多信息 |
---|---|---|
AutorunCMake | 当您编辑项目中的CMakeLists.txt 配置文件时,运行 CMake 刷新项目信息。此外,在构建项目时也会刷新项目信息。 | 查看 CMake 项目内容 |
AskBeforePresetsReload | 当您选择Build >Reload CMake Presets 时,先询问再行动。 | CMake 预置 |
AskReConfigureInitialParams | 当您选择Re-configure with Initial Variables 时,会在操作前询问。 | 使用初始变量重新配置 |
PackageManagerAutoSetup | 设置Conan或vcpkg软件包管理器以便与 CMake 配合使用。 | 与软件包管理器一起使用 CMake |
ShowAdvancedOptionsByDefault | 在Initial Configuration 和Current Configuration 中默认显示所有 CMake 变量。 | 查看高级变量 |
ShowSourceSubfolders | 在Projects 视图中隐藏子文件夹名称,并根据源组排列文件。 | 在项目视图中隐藏子文件夹名称 |
UseJunctionsForSourceAndBuildDirectories | 在 Windows 中,为 CMake 配置、构建和安装操作使用连接点。 | 在 Windows 上使用连接点 |
CMake 配置预设示例:
"vendor": { "qt.io/QtCreator/1.0": { "AskBeforePresetsReload": false, "AskReConfigureInitialParams": false, "AutorunCMake": false, "PackageManagerAutoSetup": false, "ShowAdvancedOptionsByDefault": true, "ShowSourceSubFolders": false, "UseJunctionsForSourceAndBuildDirectories": true } }
调试器预设
下表总结了可用的预设。
有关调试器首选项的更多信息,请参阅添加调试器。
预设 | 描述 |
---|---|
Abis | 以逗号分隔的系统架构定义列表。 |
Binary | 调试器可执行文件的路径。可以是绝对路径、值auto 或 ABI。在Qt Creator 不知道二进制路径的情况下,为 MSVC 工具链查找适当的调试器。 |
DisplayName | 调试器名称。 |
EngineType | 调试器引擎类型:
|
Version | 调试器的版本号。 |
Qt Creator 调试器预设示例:
"vendor": { "qt.io/QtCreator/1.0": { "debugger": { "DisplayName": "GNU gdb 11.2.0 for MinGW 11.2.0 64-bit", "Abis": ["x86-windows-msys-pe-64bit"], "Binary": "C:/Qt/Tools/mingw1120_64/bin/gdb.exe", "EngineType": 1, "Version": "11.2.0" } } }
另请参阅 CMake 编译配置、CMake、CMake 预置和SDK 工具。
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.