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

Andras Lasso lasso at queensu.ca
Fri Jul 15 09:41:34 EDT 2016


You can create symlinks in Windows (the feature was added a 10+ years ago): https://technet.microsoft.com/en-us/library/cc753194(v=ws.11).aspx

The only difficulty may be that by default you may not have the security privileges to run mklink (admin users need to run elevated command prompt; for other users "Create symbolic links" security policy has to be enabled).

Permission issues may make it tricky to add symlink creation to CMake/ExternalData scripts, but you should be able to set up shared external directory manually.

Andras

-----Original Message-----
From: vtk-developers [mailto:vtk-developers-bounces at vtk.org] On Behalf Of Brad King
Sent: July 15, 2016 7:52
To: Andrew Maclean <andrew.amaclean at gmail.com>
Cc: VTK Developers <vtk-developers at vtk.org>
Subject: Re: [vtk-developers] A single ExternalData folder for multiple variants of VTK. Is it possible?

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

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers



More information about the vtk-developers mailing list