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

时间:2024-03-17 09:13:58

挪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.
settings