lhcc@LHC-UAV:~/formation_repo$ mm make ARCH=x86
#todo: may change to more gracefully way later.
==============================================
[1/2] Generate build.ninja                    
==============================================

cd build-ninja && cmake -Wno-deprecated  -G "Ninja" /home/lhcc/formation_repo -D ARCH=x86
CMake Error: The current CMakeCache.txt directory /home/lhcc/formation_repo/build-ninja/CMakeCache.txt is different than the directory /home/szk/formation_repo/build-ninja 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/lhcc/formation_repo/CMakeLists.txt" does not match the source "/home/szk/formation_repo/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.
make: *** [Makefile:48: build-ninja] Error 1
 

 

原因是,编译的时候是直接从别人的虚拟机拷贝功能包时,编译好的文件目录和自己在编译的时候目录不匹配,因为是用户名不同所以会报错 ,处理办法如下。

方法一,简单粗暴,删除CMakeCache.txt,看报错中提到的重复文件。药到病除

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐