[vtk-developers] A single ExternalData folder for multiple variants of VTK. Is it possible?

Brad King brad.king at kitware.com
Fri Jul 15 07:52:11 EDT 2016


On 07/15/2016 02:02 AM, Andrew Maclean wrote:
> I have been looking through the documentation and user groups and can't
> find any solution to needless duplication of ExternalData in the build
> directories when building different versions of VTK.
[snip]
> .\Kitware\src\VTKExternalData\ just contains a single folder called MD5.
> .\Kitware\build\VTK-Debug\ExternalData\ contains 15 subfolders with the 
> test files and their md5-stamp.

The former is the "object store" and the latter is the directory where
the data files with names expected by the tests appear.  On UNIX the
latter is actually just full of symbolic links to the former, but on
Windows we have to make copies instead.  Unfortunately there is no way
to avoid the per-build-tree copies on Windows because we need to make the
file content available at specific paths in the build tree.

The object store is content-addressed and so can be shared among many
VTK versions and even separate projects (e.g. ITK uses this too).  There
is a VTK_DATA_STORE cache entry that can be set to point at a common
object store directory.  See CMake/vtkExternalData.cmake for more.  It
has a few defaults.  One is to just create a VTKExternalData directory
next to your VTK source tree.  That will be shared among all build trees.
Your Kitware\src\VTKExternalData is already playing this role, so there
may not be much room for improvement over your current setup.

I personally keep ExternalData_OBJECT_STORES set in my environment to
point to a single directory outside of all my build and source trees to
hold objects persistently.  This avoids needing to re-download them from
fresh builds or fresh source trees.  It won't help with per-build-tree
copies on Windows though.

-Brad



More information about the vtk-developers mailing list