CMake Error: The source “xxx“ does not match the source “yyy“ used to generate cache. Re-run cmake

简介: CMake Error: The source “xxx“ does not match the source “yyy“ used to generate cache. Re-run cmake

场景复现

今天使用CMake再次编译fmt源码时,cmake抛出一个错误。告诉我找不到一个路径,但我这个电脑本就没有这个路径。仔细一看这个路径是我在另一个电脑编译的路径。我就猜测可能是缓冲文件在捣乱。

CMake Error: The source “E:/C++Project/fmt/CMakeLists.txt” does not match the source “F:/C++Project/fmt/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.


cmake界面:

解决方案

找到我们的编译路径

删掉这个文件,这个文件保留了上次的编译的信息。

重新使用CMake编译

重新使用cmake编译,就不会抛出这种错误了。可以正常编译咯。

目录
相关文章
|
8月前
No rule to make target ‘.xxxxxxxx‘, needed by ‘debug/xxxx.cpp‘. Stop.
No rule to make target ‘.xxxxxxxx‘, needed by ‘debug/xxxx.cpp‘. Stop.
|
9月前
|
Java
No tag [else] defined in tag library imported with prefix [c]] with root cause
No tag [else] defined in tag library imported with prefix [c]] with root cause 错误处理
61 0
|
9月前
|
C++ Windows
CMake中的find_package(xxx REQUIRED)在windows平台怎么解
CMake中的find_package(xxx REQUIRED)在windows平台怎么解
434 0
|
9月前
解决运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:
解决运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:
757 0
|
程序员 iOS开发 开发者
iOS开发:程序打包提示Ignoring file XXX missing required architecture arm7 in file XXX错误
前段时间在开发过程中遇到一个iOS打包报错Ignoring file XXX missing required architecture arm7 in file XXX的问题,然后回想了一下问题所在,是因为集成了ijk播放器插件,然后ijk三方库不支持arm7造成的报错。
204 0
iOS开发:程序打包提示Ignoring file XXX missing required architecture arm7 in file XXX错误
|
开发工具 git
编译pluma:configure.ac:229: error: required file ‘pluma/mate-submodules/Makefile.in‘ not found
编译pluma:configure.ac:229: error: required file ‘pluma/mate-submodules/Makefile.in‘ not found
134 0
|
开发工具
Failed to find Build Tools revision 25.0.2
Failed to find Build Tools revision 25.0.2
138 0
|
Linux
编译OpenJDK8:specified bound depends on the length of the source argument
编译OpenJDK8:specified bound depends on the length of the source argument
189 0
|
JavaScript 前端开发
【build your own xxx】实现你自己的call和apply
【build your own xxx】实现你自己的call和apply
104 0
【build your own xxx】实现你自己的call和apply