南昌网站建设制作与维护,昆明市网站建设公司,重庆建筑有限公司,怎么查询公司的营业执照背景
window系统vs2017使用cmake实现linux远程调试和编译时#xff0c;搭建的环境报CMake 缺少以下功能:“serverMode”。请参阅 https://aka.ms/linuxcmakeconfig 了解详细信息错误#xff0c;如何解决#xff1f;经排查#xff0c;发现远程开发环境的cmake版本不支持ser…背景
window系统vs2017使用cmake实现linux远程调试和编译时搭建的环境报CMake 缺少以下功能:“serverMode”。请参阅 https://aka.ms/linuxcmakeconfig 了解详细信息错误如何解决经排查发现远程开发环境的cmake版本不支持serverMode模式因此无法实现远程编译
解决方案 验证远程目标服务器的cmake支持的能力执行以下命令cmake -E capabilities 输出结果如下 {“fileApi”:{“requests”:[{“kind”:“codemodel”,“version”:[{“major”:2,“minor”:3}]},{“kind”:“cache”,“version”:[{“major”:2,“minor”:0}]},{“kind”:“cmakeFiles”,“version”:[{“major”:1,“minor”:0}]},{“kind”:“toolchains”,“version”:[{“major”:1,“minor”:0}]}]},“generators”:[{“extraGenerators”:[],“name”:“Watcom WMake”,“platformSupport”:false,“toolsetSupport”:false},{“extraGenerators”:[],“name”:“Ninja Multi-Config”,“platformSupport”:false,“toolsetSupport”:false},{“extraGenerators”:[“CodeBlocks”,“CodeLite”,“Eclipse CDT4”,“Kate”,“Sublime Text 2”],“name”:“Ninja”,“platformSupport”:false,“toolsetSupport”:false},{“extraGenerators”:[“CodeBlocks”,“CodeLite”,“Eclipse CDT4”,“Kate”,“Sublime Text 2”],“name”:“Unix Makefiles”,“platformSupport”:false,“toolsetSupport”:false},{“extraGenerators”:[],“name”:“Green Hills MULTI”,“platformSupport”:true,“toolsetSupport”:true}],“serverMode”:false,“version”:{“isDirty”:false,“major”:3,“minor”:21,“patch”:1,“string”:“3.21.1”,“suffix”:“”}} 可以看到参数serverMode为false因此远程编译失败如何将参数置为true除了换cmake的版本目前没有想到其他的解决办法我尝试从相同版本cmake使用源码编译的方式去寻找与之相关联的参数但均尝试失败。目前在centos系统下3.17.1的版本该模式为true而3.21则不行 注意事项 如何目标服务器有多个版本的cmake在本地的CMakeSettings.json文件中cmakeExecutable字段可以指定使用哪个cmake其他变量参数应尽可能使用绝对路径避免使用类似于$HOME等宏定义变量防止于windows的环境变量冲突
参考文献
https://learn.microsoft.com/zh-cn/cpp/linux/cmake-linux-configure?viewmsvc-170https://learn.microsoft.com/zh-cn/cpp/build/get-started-linux-cmake?viewmsvc-170