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> |
||
---|---|---|
.. | ||
Directory1 | ||
Directory2 | ||
Directory3 | ||
Directory4 | ||
SubDirectory1 | ||
BadHashAlgo1-result.txt | ||
BadHashAlgo1-stderr.txt | ||
BadHashAlgo1.cmake | ||
BadHashAlgo1.txt | ||
BadOption1-result.txt | ||
BadOption1-stderr.txt | ||
BadOption1.cmake | ||
BadOption2-result.txt | ||
BadOption2-stderr.txt | ||
BadOption2.cmake | ||
BadSeries1-result.txt | ||
BadSeries1-stderr.txt | ||
BadSeries1.cmake | ||
BadSeries2-result.txt | ||
BadSeries2-stderr.txt | ||
BadSeries2.cmake | ||
BadSeries3-result.txt | ||
BadSeries3-stderr.txt | ||
BadSeries3.cmake | ||
CMakeLists.txt | ||
Data.txt.md5 | ||
Directory1-result.txt | ||
Directory1-stderr.txt | ||
Directory1.cmake | ||
Directory2-result.txt | ||
Directory2-stderr.txt | ||
Directory2.cmake | ||
Directory2.md5 | ||
Directory3-result.txt | ||
Directory3-stderr.txt | ||
Directory3.cmake | ||
Directory4-result.txt | ||
Directory4-stderr.txt | ||
Directory4.cmake | ||
Directory5-result.txt | ||
Directory5-stderr.txt | ||
Directory5.cmake | ||
LinkContentMD5-stdout.txt | ||
LinkContentMD5.cmake | ||
LinkContentSHA1-stdout.txt | ||
LinkContentSHA1.cmake | ||
MissingData-result.txt | ||
MissingData-stderr.txt | ||
MissingData.cmake | ||
NoLinkInSource-stderr.txt | ||
NoLinkInSource-stdout.txt | ||
NoLinkInSource.cmake | ||
NoURLTemplates-result.txt | ||
NoURLTemplates-stderr.txt | ||
NoURLTemplates.cmake | ||
NormalData1-stdout.txt | ||
NormalData1.cmake | ||
NormalData2-stdout.txt | ||
NormalData2.cmake | ||
NormalData3-stdout.txt | ||
NormalData3.cmake | ||
NormalDataSub1-stdout.txt | ||
NormalDataSub1.cmake | ||
NotUnderRoot-result.txt | ||
NotUnderRoot-stderr.txt | ||
NotUnderRoot.cmake | ||
RunCMakeTest.cmake | ||
Semicolon1-stdout.txt | ||
Semicolon1.cmake | ||
Semicolon2-stdout.txt | ||
Semicolon2.cmake | ||
Semicolon3-stdout.txt | ||
Semicolon3.cmake | ||
SubDirectory1-stdout.txt | ||
SubDirectory1.cmake |