You can easily avoid this bad experience by using different builds environments : one per compiler !<br><div class="gmail_quote"><div dir="ltr">Le sam. 2 juin 2018 à 11:43, René J.V. Bertin <<a href="mailto:rjvbertin@gmail.com">rjvbertin@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
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.<br>
<br>
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.<br>
<br>
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...<br>
<br>
R.<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div>