如何设置VS代码的CMAKE选项
如何在VSCODE上设置CMAKE的选项?有人说这是在任务中。 但是仍然有Qutestions,
设置中
{
//test ok
"cmake.configureArgs": [
"-DCMAKE_BUILD_TYPE=Release",
"-DENABLE_TENSORRT=on",
]
}
。
在 。
How to set cmake's options on vscode? somebody said it is in task.json, the other said in setting.json, I test it works in setting.json
but there are still qutestions,
In setting.json, I set
{
//test ok
"cmake.configureArgs": [
"-DCMAKE_BUILD_TYPE=Release",
"-DENABLE_TENSORRT=on",
]
}
But in the bottle of vscode on which cmake toolbar appears, it seems the program still build in Debug mode
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我亲自将其设置在root cmakelists.txt上,通过
在我的cmake_minimum_required命令之后添加以下行。现在显然,这将其设置为调试,但是您可以使用其他任何(如果我没记错的话)构建类型。
我希望有帮助。
I personally set this at the root CMakeLists.txt by adding the following line
after my cmake_minimum_required command. Now obviously this sets it to Debug but you can use any of the other (three if I am not mistaken) build types.
I hope that helps.