使用cmakesettings.json与cmake
我在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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请注意,在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.