Hi, I also found that e.g. Qt Creator throws away the cache too eagerly, e.g. when changing the deployment target IP address on the kit.
This led me to finding a solution for keeping command line definitions elsewhere because relying on the cache will hurt you bad sometimes. Maybe more project-foreign people need to test cmake-enabled IDEs and ask for better behavior. Otoh, cmake also should not rely that hard on its cache. When I upgrade the Qt installation and delete the old one, cmake fails hard where only a cmake expert can recover easily from. Why can't it check that cache file locations still exist when it runs? When I upgrade gcc on linux, cmake doesn't notice at all, although almost all derived values are wrong at that point. HS Am 2. Juni 2018 11:43:02 MESZ schrieb "René J.V. Bertin" <rjvber...@gmail.com>: >Hi, > >This happened once too often for me: I apply successive tweaks to a >CMakeCache file, reinvoke make (or ninja) and then at some point lose >everything because I forgot that changing the compiler is a "lethal" >operation. > >Why does cmake have to throw away the entire cache file when something >changes in the compiler path? That seems like a cheap way to implement >a "let's keep track of which cached settings depend on the choice of >compiler". At the least it wouldn't be much less cheap to rename >CMakeCache.txt to CMakeCache.bak instead of deleting it. > >And FWIW, this is also a situation in which storing the exact CMake >invocation in a comment at the top of the cache file could be useful... > >R. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake