Add ExternalData module

Take files distributed in ITK 'master' as of 2013-05-06:

  CMake/ExternalData.cmake
  CMake/ExternalData_config.cmake.in

and add them for distribution in upstream VTK.

Change-Id: I2c7f97ff093f091d7de4ac809704219c9895dcd3
ExternalData: Remove compatibility with CMake < 2.8.5

VTK already requires CMake >= 2.8.5 so our copy of the
ExternalData.cmake module does not need to be compatible with earlier
versions.

Change-Id: I7d549ae22c4f18edfee07f2412772d01ea4f61d3
Add ExternalData infrastructure

Port the ExternalData configuration from ITK 'master' as of 2013-05-06.

Add a CMake/vtkExternalData.cmake module to include and configure the
ExternalData module for VTK.  List MIDAS and vtk.org URLs.

Include vtkExternalData from the top-level CMakeLists.txt file and from
Testing/External/CMakeLists.txt so it works for both the main build and
when building tests externally.

Teach the VTK pre-commit hook to move staged .ExternalData_MD5_* files
left by the ExternalData module into the store at the top of the source
tree as .ExternalData/MD5/* and import them into Git as refs/data/MD5/*.
Teach the VTK git-gerrit-push alias to push content from refs/data/MD5/*
when commits referencing it are pushed to Gerrit.

Add a .gitignore to tell Git to ignore .ExternalData* names.

Change-Id: I8c0a91cb3ce350450e378e4f16a23c62e7f2de6f
Filters/Modeling: Fix sync3dAll.py valid image name

Refer to valid image "sync3dAll.png", not "contour3DAll.png".  The two
appear identical but we should use the one that matches the test name.

Change-Id: Ie21559cde8aebcca9ad8529bcffb30852663834e
vtkTestingMacros: Remove unused code

Remove unused vtk_tests_python macro.
Remove unused -A "${VTK_LIBRARY_DIR}" argument.
Remove computation of unused local _baselinedname value.

Change-Id: I3f28e28e6f8576380c3e1aa51c0fb66a11e1c5ff
vtkTestingMacros: Generalize add_test_(python|tcl)

Teach add_test_(python|tcl) to parse explicit NO_DATA, NO_RT, NO_VALID,
and NO_OUTPUT keyword options for tests that do not need VTK_DATA_ROOT
or do not use a valid baseline image.  Factor add_test_python1 into
add_test_python and distinguish them with the NO_RT keyword argument.
Update call sites to produce identical test command lines before and
after this change.

Change-Id: I09f874b26aab409e55e7aa6f92412314540dbb85
vtkTestingMacros: Rename add_test_(mpi|python|tcl) with vtk_ prefix

Use shell code:

 git grep -Elz '\<add_test_(mpi|python|tcl)' |
 xargs -0 sed -ri 's/\<add_test_(mpi|python|tcl)/vtk_add_test_\1/g'

Change-Id: I6d076e2483209a83231fb1c96053f0389a3fcdf2
vtkTestingMacros: Validate argument combinations more strictly

Require all calls to vtk_add_test_(python|tcl) to specify either a
baseline directory name or an explicit NO_VALID option to indicate that
no baseline image is used.  Fix call sites to match what their tests
expect.

Change-Id: Ibd18f4de86415c72dfdad1491b1897883dc6d353
Factor vtkTestingRenderingDriver out of vtkTestingObjectFactory

Separate the test driver code from the create_test_sourcelist call.

Change-Id: I9c9ba845e2f2ac27b67f2f54126735b959a15c5e
vtkTestingMacros: Add vtk_add_test_cxx function

Create a function with a signature similar to vtk_add_test_(python|tcl)
that can be used to add C++-implemented tests.  Support more than one
test name per call each optionally followed by a comma-separated list of
per-test options.  Store test source files in a VTK_TEST_CXX_SOURCES
directory property so callers can get the list of source files to
compile into a test driver.

Add macro vtk_test_cxx_executable to get the VTK_TEST_CXX_SOURCES value
and invoke create_test_sourcelist and vtk_module_test_executable.  Use
optional arguments to enable the rendering factory or add extra sources
to the executable.

Change-Id: I73dee627fa87a399c48b409af046b116fc75a0fd
vtkTestingMacros: Simplify vtk_add_test_mpi signature

Use keyword options VTK_DATA_ROOT and VTK_LARGE_DATA_ROOT to indicate
the source of data for the MPI test, if any.

Change-Id: I170b4dcb88984df5ec0bba46fa6587e0aeea63f3
vtkTestingMacros: Remove vtk_tests macro

Use vtk_add_test_cxx and vtk_test_cxx_executable to replace calls to
vtk_tests.  Then remove vtk_tests and parse_optional_arguments.

Change-Id: I73dee627fa87a399c48b409af046b116fc75a0fd
Use vtk_add_test_cxx function

Refactor */*/Testing/Cxx/CMakeLists.txt to use the vtk_add_test_cxx
function instead of direct add_test calls.

Change-Id: I73dee627fa87a399c48b409af046b116fc75a0fd
Use vtk_add_test_(python|tcl) where possible

Convert some direct add_test calls to use the helper functions instead.

Change-Id: I4f6b92e24804885c6b1449b21ae8efffd22ffdbf
Mark non-baseline tests with NO_VALID option

Tell calls to vtk_add_test_(cxx|python|tcl) explicitly when there is no
valid baseline image to avoid passing -V unnecessarily.

Change-Id: Ibe5aecdfa076446ddda0b95e814483eb6622af73
Merge branch 'cleanup-add_test-calls' into use-ExternalData

Change-Id: I70d0463a94ebd7c25ca931e0ce9be3269d561ac9
vtkTestingMacros: Temporarily copy baselines to source tree

Teach vtk_add_test_* to copy baseline images for each test into a
corresponding "Testing/Data/Baseline" directory within each module
source tree.  This is a temporary change meant only for use locally to
transition VTKData and VTKLargeData baseline images to ExternalData
content links.

Change-Id: I17da7af13dadd75805ad6c7c5485a61bc4169bc6
vtkTestingMacros: Temporarily remove baselines from VTKData

Teach vtk_add_test_* remove baseline images for each test from the
VTKData or VTKLargeData tree.  This is a temporary change meant only for
use locally to transition VTKData and VTKLargeData baseline images to
ExternalData content links.

Change-Id: I510418dd367ae01995992bfb3b9df0bb021e27da
vtkTestingMacros: Revert temporary data transform changes

Revert the parent and grandparent changes to vtk_add_test_* since they
were only for temporary use locally.

Change-Id: I9df6fd28f56717d560e26eb4705eb9c8c6413ca0
Use ExternalData to reference test baselines

Teach vtk_add_test_* to use ExternalData_add_test to add tests and use
DATA{} syntax to reference test baseline images.  Also update direct
add_test calls in several modules.

Change-Id: I1ddcec1c109ea9ca7840be9b6ccf015393039cba