我想在 VS Code 中设置一个任务来使用 CMake 配置项目。
遗憾的是我不知道如何传递参数
-DCMAKE_C_COMPILER:FILEPATH=gcc
在任务中使用 CMake。
IDE 报告不支持“args”。
当前片段:
"tasks": [
{
"type": "cmake",
"label": "CMake: configure",
"command": "configure",
"problemMatcher": [],
"detail": "CMake template configure task"
},
],
cmake.configureArgs
设置,以及所选 配置预设中指定的参数(请参阅 preset
任务类型架构的 cmake
属性),例如 cacheVariables
中缓存变量的参数配置预设属性,或相应命令行参数的其他属性。