cmake failure because of CMakeCache.txt mismatch
Opened this issue · 0 comments
v3l0c1r4pt0r commented
In very rare cases, after some modifications to template build system it is possible to encounter following error:
$ sadve --hex --define WDIOC_GETSTATUS linux/watchdog.h
CMake Error: The current CMakeCache.txt directory <HOME>/.cache/sadve/simple/CMakeCache.txt is different than the directory <HOME>/.cache/sadve/define 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 "/usr/local/share/sadve/simple/CMakeLists.txt" does not match the source "<SOURCE>/sadve/in/define/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
As we can expect it to happen from time to time, it would be nice to handle the situation automagically, as user does not have to know cmake is even invoked under the hood.