Unable to change 'Source Code Directory' for wxWidgets-3.1.15 installation

Hello,

My 1st attempt at a wxWidgets-3.1.15 installation failed using source directory ‘demo’. On 2nd attempt I extracted wxWidget-3.1.5 to directory ‘wxWidgets-3.1.15’.

When I reran CMake, it thinks the source is located in the previous installation directory (demo). I changed the source directory to the NEW directory, but it’s still pointing at the old source directory which no longer exists. How do I remove the old directory from CMake files?

CMake Error: The source “C:/Users/Jim/wxWidgets-3.1.5/CMakeLists.txt” does not match the source “C:/Users/Jim/demo/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.

If you need to change the source directory, delete the contents of the build directory as well (technically, you only need to delete the CMakeCache.txt file from the build directory). CMake caches the location of the source directory and doesn’t allow you to change it, as you’ve discovered.

Thanks, Craig!

The current CMakeCache.txt directory /Users/devanshiarora/downloads/ChromaticCalorimetry/spacal-simulation/build/CMakeCache.txt is different than the directory /home/spacal/Documents/LHCb/simulations/ChromaticCalorimetry/spacal-simulation/build 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 “/Users/devanshiarora/downloads/ChromaticCalorimetry/spacal-simulation/CMakeLists.txt” does not match the source “/home/spacal/Documents/LHCb/simulations/ChromaticCalorimetry/spacal-simulation/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.

Last command “cmake $CMAKE_ARGS …/” returned with exit code 1.

I got this error, how to move from this?