参考链接
将make过的文件夹复制到另一个目录下在重新cmake出现如下错误
CMake Error: The current CMakeCache.txt directory /home/nvidia/bh/practice/opencv/zed-opencv-master/cpp/build/CMakeCache.txt is different than the directory /home/nvidia/bh/zed-opencv-master/cpp/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "/home/nvidia/bh/practice/opencv/zed-opencv-master/cpp/CMakeLists.txt" does not match the source "/home/nvidia/bh/zed-opencv-master/cpp/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
解决办法
进入到build文件夹中删除CMakeCach.txt即可