clion CMake Error:different than the directory..where was created. being created in the wrong place.

挪clion工程到新的文件夹后,编译报错

现象:

CMake Error: The current CMakeCache.txt directory .../CMakeCache.txt is different than the directory ... 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

解决方案:

file-》settings

cmake选项卡中,定义generate path路径

../cmake-build-debug

../cmake-build-release

重新编译即可

clion CMake Error:different than the directory..where was created. being created in the wrong place._第1张图片 settings

 

你可能感兴趣的:(老铁,0,Error(s)!,cmake,c++,debug)