Each data file to be created in the build tree corresponds one-to-one with
a raw file or content link in the source tree. Use the MAIN_DEPENDENCY of
add_custom_command to attach the build rule to the source tree file. This
looks much nicer in the IDE project file browser and avoids ".rule" files.
Use private global variables _ExternalData_REGEX_(ALGO|EXT) to match the
possible hash algorithm names and extensions in regular expressions.
Use "file(<algo>)" instead of "cmake -E md5sum" to compute hashes
without a child process and to support more hash algorithms.
Use a trailing slash to reference a directory. Require that a list
of associated files be specified to select from within the directory.
One may simply use DATA{Dir/,REGEX:.*} to reference all files but
get a directory passed on the command line.
Refactor use of the ExternalData_SERIES_MATCH value to avoid assuming
that it has no ()-groups that interfere with group indexing.
Extend the Module.ExternalData test to cover this case.
Automatic series recognition can generate false positives too easily
when the default series configuration is flexible enough to handle
common cases. Avoid false positives by requiring an explicit syntax to
activate series recognition. Choose the syntax DATA{<name>,:} to be
short, simple, and look like a vertical ellipsis.
This allows us to improve the default series match configuration. Allow
series references to contain one of the numbered file names. Allow '-'
as a separator in addition to '.' and '_'. Document what the default
configuration matches. Also provide more options to configure series
<name> parsing.
Take files we previously distributed in ITK 4.3.1:
CMake/ExternalData.cmake
CMake/ExternalData_config.cmake.in
and add them for distribution in upstream CMake. Update the copyright
notice block format to follow CMake conventions.