1823ab4d76
The CMake language implicitly flattens lists so a ";" in a list element must be escaped with a backslash. List expansion removes backslashes escaping semicolons to leave raw semicolons in the values. Teach ExternalData_Add_Test and ExternalData_Expand_Arguments to re-escape semicolons found in list elements so the resulting argument lists work as if constructed directly by the set() command. For example: ExternalData_Add_Test(Data NAME test1 COMMAND ... "a\\;b") ExternalData_Expand_Arguments(Data args2 "c\\;d") add_test(NAME test2 COMMAND ... ${args2}) should be equivalent to set(args1 "a\\;b") add_test(NAME test1 COMMAND ... ${args1}) set(args2 "c\\;d") add_test(NAME test2 COMMAND ... ${args2}) which is equivalent to add_test(NAME test1 COMMAND ... "a;b") add_test(NAME test2 COMMAND ... "c;d") Note that it is not possible to make ExternalData_Add_Test act exactly like add_test when quoted arguments contain semicolons because the CMake language flattens lists when constructing function ARGN values. This re-escape approach at least allows test arguments to have semicolons. While at it, teach ExternalData APIs to not transform "DATA{...;...}" arguments because the contained semicolons are non-sensical. Suggested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com> |
||
---|---|---|
.. | ||
Data2 | ||
Data3 | ||
Directory | ||
MD5 | ||
SHA1 | ||
SHA224 | ||
SHA256 | ||
CMakeLists.txt | ||
Data Space.dat.md5 | ||
Data.dat.md5 | ||
Data1Check.cmake | ||
Data2.dat.md5 | ||
Data2b.dat.md5 | ||
MetaA.dat.md5 | ||
MetaB.dat.md5 | ||
MetaC.dat.md5 | ||
MetaTop.dat.md5 | ||
PairedA.dat.md5 | ||
PairedB.dat.md5 | ||
SeriesA.dat.md5 | ||
SeriesA1.dat.md5 | ||
SeriesA2.dat.md5 | ||
SeriesA3.dat.md5 | ||
SeriesAn1.dat.md5 | ||
SeriesAn2.dat.md5 | ||
SeriesAn3.dat.md5 | ||
SeriesB.dat.md5 | ||
SeriesB_1.dat.md5 | ||
SeriesB_2.dat.md5 | ||
SeriesB_3.dat.md5 | ||
SeriesBn_1.dat.md5 | ||
SeriesBn_2.dat.md5 | ||
SeriesBn_3.dat.md5 | ||
SeriesC.1.dat.md5 | ||
SeriesC.2.dat.md5 | ||
SeriesC.3.dat.md5 | ||
SeriesC.dat.md5 | ||
SeriesCn.1.dat.md5 | ||
SeriesCn.2.dat.md5 | ||
SeriesCn.3.dat.md5 | ||
SeriesD-1.dat.md5 | ||
SeriesD-2.dat.md5 | ||
SeriesD-3.dat.md5 | ||
SeriesD.dat.md5 | ||
SeriesDn-1.dat.md5 | ||
SeriesDn-2.dat.md5 | ||
SeriesDn-3.dat.md5 | ||
SeriesMixed.1.dat.md5 | ||
SeriesMixed.2.dat.sha1 | ||
SeriesMixed.3.dat.sha224 | ||
SeriesMixed.4.dat.sha256 |