如何创建CMAKE变量
我只是问了一个问题 a>
我自己解决了这个问题。我想要的是在Visual Studio Cmake Project中创建两个项目配置X86-Linux和X64-Linux。
我有WSL和远程Linux。
请参阅,在链接中,我有一个变量force_32
。如果将其设置为1,我希望CMAKE将继续构建正确的二进制文件。但是问题是如何通过“管理配置”或“ cmakesettings.json”设置此变量。我
"variables": [
{
"name": "FORCE_32",
"value": "1",
"type": "INTEGER"
}
]
在cmakesettings.json中尝试过,并在视觉工作室中得到了此警告,
manually-specified variables were not used by the project visual studio FORCE_32
Linux -x64
我不知道该如何进行。我要做的就是一种方法,以便可以随时构建32或64位的构建,而无需每次编辑CMakelists.txt
I just asked a question here
That problem is solved by myself. All i want is to create two project configurations x86-Linux and x64-Linux in Visual studio CMake Project.
I have both WSL and remote linux.
See, in the link, i have a variable FORCE_32
. If it is set to 1, i hope cmake will proceed to build the correct binaries. But the problem is how to set this variable via "Manage Configurations" or "CMakeSettings.json". I tried
"variables": [
{
"name": "FORCE_32",
"value": "1",
"type": "INTEGER"
}
]
in CMakeSettings.json and to which i got this warning in Visual Studio
manually-specified variables were not used by the project visual studio FORCE_32
Linux -x64
I do not know how to proceed. All i am trying to do is a way so that 32 or 64 bit builds can be built any time without editing CMakeLists.txt each time
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在cmakesettings.json修改中
In CMakeSettings.json modify