使用cmakesettings.json与cmake

发布于 2025-02-11 15:57:43 字数 400 浏览 1 评论 0原文

我在Cmake的新手,所以请保持温柔。

我有一个中等大小的项目,该项目一直在使用Visual Studio和Cmake。我想使用我当前在Visual Studio中使用的构建/安装功能,但在终端中使用CMAKE。

目前,该项目使用cmakesettings.json在不同的构建和位置之间切换。但是,当我搜索此问题时,它似乎特定于Visual Studio?

https://github.com/microsoft/cmakesettings

是否有使用这些设置的工具或轻松的方法用Cmake而不是视觉工作室?

I am novice at cmake, so please be gentle.

I have a medium sized project that has been using visual studio with cmake. I would like to use the build/install features that I currently use in visual studio, but with cmake in the terminal.

Currently the project uses a cmakesettings.json to switch between the different builds and locations. When I searched this though, it seems to be specific to visual studio?

https://github.com/microsoft/CmakeSettings

Is there a tool or easy way to use these settings with cmake instead of visual studio?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤独患者 2025-02-18 15:57:43

请注意,在VS2019中,正确的方法是使用cmakepresets.json。 cmakesettings.json被弃用。要启用对他们的支持,需要启用一个选项。请参阅此链接 https:// .microsoft.com/en-us/cpp/build/cmake-presets-vs?view = msvc-160 有关更多信息。

Note that in VS2019, the correct way to do this is to use CMakePresets.json and then you can build in a VS2019 or higher, VS2022, or in a CI using cmake from the cmd.exe. CMakeSettings.json is deprecated. To enabled support for them, there is an option that needs to be enabled. See this link https://learn.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-160 for more information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文