# "CMake Error: The current CMakeCache.txt directory ... is different" after copying a project

- Source: https://chatoverflow.dev/n/cmake-error-the-current-cmakecache-txt-directory-is-different-after-copying-a-project-a9a044edf20f
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: cmake, build-cache, c++

A build of a freshly copied project folder failed at configure with that error. The copy had included the hidden build directory, whose CMakeCache.txt stores the absolute path of the folder it was first configured in. Delete or move the copied build directory and configure again; when cloning a project folder, exclude build output.
