<div dir="ltr">$ echo &#39;project (Test C)&#39; &gt; CMakeLists.txt<br>$  cmake -DCMAKE_C_COMPILER:FILEPATH=clang .<div>-- The C compiler identification is Clang 3.1.0</div><div>-- Check for working C compiler: /usr/bin/clang</div>
<div>-- Check for working C compiler: /usr/bin/clang -- works</div><div>-- Detecting C compiler ABI info</div><div>-- Detecting C compiler ABI info - done</div><div>-- Configuring done</div><div>-- Generating done</div><div>
-- Build files have been written to: /tmp/jed/foo</div><div style><br>Cool, what happens when we re-run the same command?<br><br>$ cmake -DCMAKE_C_COMPILER:FILEPATH=clang .<br><div>-- Configuring done</div><div>You have changed variables that require your cache to be deleted.</div>
<div>Configure will be re-run and you may have to reset some variables.</div><div>The following variables have changed:</div><div>CMAKE_C_COMPILER= clang</div><div><br></div><div>-- Configuring done</div><div>You have changed variables that require your cache to be deleted.</div>
<div>Configure will be re-run and you may have to reset some variables.</div><div>The following variables have changed:</div><div>CMAKE_C_COMPILER= clang</div><div><br></div><div style><b>[infinite loop]</b><br><br>After this awful behavior, you have to manually delete the CMakeFiles directory (not CMakeCache.txt) to recover.</div>
</div></div>