问题 CMake Error at cmake/OpenCVCompilerOptions.cmake:21 (else): Flow control statements are not properly nested. 打开对应的cmake文件21行发现同一个作用域有两个else 解决方法 21行22行注释掉就可以了 别的电脑也编译过貌似没出现过这种问题,应该与cmake版本有关