title: How do I fix an apparently corrupted CMake build?
body: <p>I am getting the following error from CMakeSetup on our source tree:</p>
  
  <pre><code>CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
  Missing variable is:
  CMAKE_FIND_LIBRARY_PREFIXES
  </code></pre>
  
  <p>Deleting the cache doesn't help, so something in one of the CMakeLists must be the problem. The weird part is, if I copy in a CMakeCache.txt from an old version of the tree, and edit it so that the paths match, CMake will then configure successfully... and, even after deleting that fixed cache, it continues to configure successfully.</p>
  
  <p>Any idea what I should look for?</p>
  
  <p>There are two variables missing from the bad CMakeCache.txt when it's generated: Project_BINARY_DIR and Project_SOURCE_DIR.</p>