vscode用CMake编译Qt出现Not searching for unused variables given on the command line问题的解决

在vscode中安装了Cmake、CMake Tools和CMake Integration插件,发现尽管参数配置正确但是CMake编译QT使用visualstudio.12.0 -x86_amd64编译期还是出现Not searching for unused variables given on the command line错误。最后发现CMake Integration插件与CMakeTools插件有一定的冲突,卸载掉CMake Integration插件正常编译。

[main] 正在配置项目: shilei [proc] 执行命令: /usr/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -Dcmake.cmakePath:STRING=/usr/bin/cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ --no-warn-unused-cli -S/home/yun/shilei/chatproject -B/home/yun/shilei/build -G "Unix Makefiles" [cmake] Not searching for unused variables given on the command line. [cmake] -- The C compiler identification is GNU 13.2.0 [cmake] -- The CXX compiler identification is GNU 13.2.0 [cmake] -- Detecting C compiler ABI info [cmake] -- Detecting C compiler ABI info - done [cmake] -- Check for working C compiler: /usr/bin/gcc - skipped [cmake] -- Detecting C compile features [cmake] -- Detecting C compile features - done [cmake] -- Detecting CXX compiler ABI info [cmake] -- Detecting CXX compiler ABI info - done [cmake] -- Check for working CXX compiler: /usr/bin/g++ - skipped [cmake] -- Detecting CXX compile features [cmake] -- Detecting CXX compile features - done [cmake] CMake Error at CMakeLists.txt:18 (add_subdirectory): [cmake] The source directory [cmake] [cmake] /home/yun/shilei/chatproject/src [cmake] [cmake] does not contain a CMakeLists.txt file. [cmake] [cmake] [cmake] -- Configuring incomplete, errors occurred! [cmake] See also "/home/yun/shilei/build/CMakeFiles/CMakeOutput.log". [proc] 命令“/usr/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -Dcmake.cmakePath:STRING=/usr/bin/cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ --no-warn-unused-cli -S/home/yun/shilei/chatproject -B/home/yun/shilei/build -G "Unix Makefiles"”已退出,代码为 1 [ctest] 在测试资源管理器中找不到文件夹: /home/yun/shilei/chatproject
03-17
c:\users\szut\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. setuptools.SetuptoolsDeprecationWarning, -------------------------------------------------------------------------------- -- Trying 'Ninja (Visual Studio 17 2022 x64 v143)' generator -------------------------------- --------------------------- ---------------------- ----------------- ------------ ------- -- Not searching for unused variables given on the command line. CMake Error at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. -- Configuring incomplete, errors occurred! -- ------- ------------ ----------------- ---------------------- --------------------------- -------------------------------- -- Trying 'Ninja (Visual Studio 17 2022 x64 v143)' generator - failure -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Trying 'Visual Studio 17 2022 x64 v143' generator -------------------------------- --------------------------- ---------------------- ----------------- ------------ ------- -- Not searching for unused variables given on the command line. CMake Error at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Update the VERSION argument <min> value. Or, use the <min>...<max>
最新发布
03-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值