Jep*_*sen 3 cmake visual-studio-code
我想使用CMake工具扩展在Visual Studio Code中开发CMake项目。
我使用以下命令在命令行中构建项目:
PS project\build> cmake -G"Visual Studio 14 2015 Win64" -DBOOST_ROOT=some\path -DQT_ROOT=another\path\ project\path
Run Code Online (Sandbox Code Playgroud)
如何在.cmaketools.json文件.vscode夹下的文件中使用相同的选项设置相同的命令?我想从编辑器内部运行它,如果可能的话,还指定输出文件夹,而不是build在我的项目中创建一个文件夹。
这是我的实际.cmaketools.json:
{
"variant": {
"label": "Debug",
"keywordSettings": {
"buildType": "debug"
},
"description": "Emit debug information without performing optimizations"
},
"activeEnvironments": [
"Visual C++ 14.0 - amd64"
]
}
Run Code Online (Sandbox Code Playgroud)
该.vscode\.cmaketools.json文件只是Visual Studio代码-CMake工具扩展的“工作区缓存”。查看他们的代码:
Run Code Online (Sandbox Code Playgroud)/** * The workspace cache stores extension state that is convenient to remember * between executions. Things like the active variant or enabled environments * are stored here so that they may be recalled quickly upon extension * restart. */
我想你想要的是一个.vscode\settings.json描述这里与例如以下内容:
/**
* The workspace cache stores extension state that is convenient to remember
* between executions. Things like the active variant or enabled environments
* are stored here so that they may be recalled quickly upon extension
* restart.
*/
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8998 次 |
| 最近记录: |