构建Opencv中的Cmake策略设置
我不确定在哪里设置cmake_政策。 这解释了cmake_的政策。但不确定在哪里设置cmake策略。 我使用cmake构建Opencv,我有很多警告,比如构建Opencv中的Cmake策略设置,opencv,cmake,Opencv,Cmake,我不确定在哪里设置cmake_政策。 这解释了cmake_的政策。但不确定在哪里设置cmake策略。 我使用cmake构建Opencv,我有很多警告,比如 CMake Warning (dev) at cuda_compile_generated_row_filter.2.cu.o.cmake:137 (if): Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when u
CMake Warning (dev) at cuda_compile_generated_row_filter.2.cu.o.cmake:137 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
我需要设置likecmake\U策略(设置CMP0054新)
。
在哪里设置此策略?
我确实喜欢
ppp@ppp-Inspiron-7537:~/Softwares/opencv-2.4.9/build$ cmake_policy(SET CMP0054 NEW)
bash: syntax error near unexpected token `SET'
但我犯了个错误。
如何设置策略?使用
-Wno dev
选项cmake
抑制针对开发人员的警告:
cmake -Wno-dev <other-options> <source-dir>
在开始的某个地方
请注意,您需要为属性使用OLD值,因为项目很可能依赖于此类变量的解引用。设置新值可能会破坏项目的功能
当项目的代码被修复时,即使没有明确的策略集,也不会生成警告
cmake_policy(SET CMP0054 OLD)