CMake Warning (dev) at CMakeLists.txt:5 (set): Syntax error in cmake code at E:/PycharmProjects/mend/tensorrtx/yolov5/CMakeLists.txt:5 when parsing string E:\itOpencv\opencv\build Invalid escape sequence \i Policy CMP0010 is not set: Bad variable reference syntax is an error. Run "cmake --help-policy CMP0010" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMakeLists.txt:10 (set): Syntax error in cmake code at
时间: 2024-03-11 20:46:25 浏览: 238
linphone-desktop出现Cmake Error at builders/vpx.cmake:89的几个错误文件解决
这个警告信息表明,在 CMakeLists.txt 文件的第 5 行和第 10 行出现了语法错误。具体地说,第 5 行中的字符串 "E:\itOpencv\opencv\build" 中的反斜杠 "\" 被视为无效的转义序列,需要进行修复。在 CMake 中,反斜杠是用来进行路径分隔符转义的,因此您可以将路径中的反斜杠改为正斜杠 "/",或者将每个反斜杠都加倍,即将 "\" 改为 "\\"。另外,警告信息中提到了 CMP0010 策略,您可以通过在 CMakeLists.txt 文件中添加 `cmake_policy(SET CMP0010 NEW)` 来设置该策略并消除警告。
阅读全文