CMake if 判断的一个常见问题

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语句的判断表达式的变量不能带"${}",结果问题解决了,特此记录。

你可能感兴趣的:(CMake,c++)