Skip to content

cmake --fresh does not overcome having renamed the directory

Working on a Macintosh, I moved my project directory to a new location. CMake wasn't comfortable with that. To my great surprise, even cmake --fresh didn't resolve the error message, but I had to MANUALLY go in and delete the cache file and CMakeFiles directory. Surely you didn't mean that! This is fully reproducible.

% pwd
/Users/ken/vsc
% cd ../prog24/Catchwater/
% cmake --fresh .
CMake Error: The current CMakeCache.txt directory /Users/ken/prog24/Catchwater/CMakeCache.txt is different than the directory /Users/ken/vsc/catch 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

 % <Used Apple’s Finder to delete files>

% cmake --fresh .
-- The C compiler identification is AppleClang 15.0.0.15000100
-- The CXX compiler identification is AppleClang 15.0.0.15000100
<…success>
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information