🎨 refactor(.vscode/tasks.json): 移除CMake配置任务,添加并行编译线程数的输入选项
🐛 fix(demo/oled/test.c): 优化代码可读性
main
parent
68d2ce3205
commit
58ead967ff
|
@ -19,30 +19,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"label": "CMake Configure",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "cmake",
|
|
||||||
"dependsOn": [
|
|
||||||
"Create Build Directories"
|
|
||||||
],
|
|
||||||
"args": [
|
|
||||||
"-S",
|
|
||||||
".",
|
|
||||||
"-B",
|
|
||||||
"build",
|
|
||||||
"-G",
|
|
||||||
"${input:cmakeGenerator}"
|
|
||||||
],
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"problemMatcher": [
|
|
||||||
"$gcc"
|
|
||||||
],
|
|
||||||
"detail": "Configure the project using CMake."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"label": "CMake Build",
|
"label": "CMake Build",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
|
@ -54,7 +30,9 @@
|
||||||
"--build",
|
"--build",
|
||||||
"build",
|
"build",
|
||||||
"--target",
|
"--target",
|
||||||
"all"
|
"all",
|
||||||
|
"--",
|
||||||
|
"-j${input:threadCount}"
|
||||||
],
|
],
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
|
@ -63,7 +41,7 @@
|
||||||
"problemMatcher": [
|
"problemMatcher": [
|
||||||
"$gcc"
|
"$gcc"
|
||||||
],
|
],
|
||||||
"detail": "Build the project using CMake and Ninja."
|
"detail": "Build the project using CMake with parallel compilation."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"inputs": [
|
"inputs": [
|
||||||
|
@ -78,6 +56,12 @@
|
||||||
],
|
],
|
||||||
"default": "Ninja",
|
"default": "Ninja",
|
||||||
"description": "The CMake generator to use."
|
"description": "The CMake generator to use."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "promptString",
|
||||||
|
"id": "threadCount",
|
||||||
|
"description": "Number of parallel compilation threads",
|
||||||
|
"default": "16"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue