CMake if 判断的一个常见问题

来源:互联网 发布:北京秦淮数据有限公司 编辑:程序博客网 时间:2024/05/19 01:13
CMake Warning (dev) at lib/cryptopp/CMakeLists.txt:142 (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编译为知笔记的源码,居然出问题,遂慢慢找原因,怎么找都没有解决方法,最后记起了CMake的if语句的判断表达式的变量不能带"${}",结果问题解决了,特此记录。
0 0
原创粉丝点击