【发布时间】:2016-05-19 07:31:54
【问题描述】:
我不确定在哪里设置 cmake_policy。 这个link 解释了cmake_policy。但不确定在哪里设置 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 unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
我需要设置为cmake_policy(SET CMP0054 NEW)。
在哪里设置此政策?
我确实喜欢
ppp@ppp-Inspiron-7537:~/Softwares/opencv-2.4.9/build$ cmake_policy(SET CMP0054 NEW)
bash: syntax error near unexpected token `SET'
但我得到了错误。 如何设置政策?
【问题讨论】: