Cmake error in vtkeigen when building from source

I’m trying to build vtk from source on Ubuntu since I’m having trouble accessing vtkXdmfReader in pre-built libraries. Following the instructions here: https://vtk.org/Wiki/VTK/Building/Linux, when running this series of commands from my home directory:

mkdir VTK-Release-build
cd VTK-Release-build
cmake -DCMAKE_BUILD_TYPE:STRING=Release ../VTK

I get the error:

CMake Error at ThirdParty/eigen/vtkeigen/CMakeLists.txt:10 (message):
  In-source builds not allowed.  Please make a new directory (called a build
  directory) and run CMake from there.  You may need to remove
  CMakeCache.txt.

As you can see, however, my source and release directories are distinct. What am I missing?

Eigen is detecting under-source as in-source as well. I don’t know if that’s actually true, but I don’t think it’s there for no reason. The new build instructions live here though it makes no mention of directory structure requirements. I’ll add that.

Looking at the logic, I don’t know why it is detecting that you have an overlapping build tree. Does your source tree have a CMakeCache.txt in it? If so, CMake is detecting your command as a reconfigure given an existing build tree rather than a request for a new build tree pointing to a source tree. I recommend cleaning your source tree and then retrying.