mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-20 05:12:07 -05:00
ExternalData: Add support for multiple hash algorithms
Add support for projects to have `Data.txt.md5` *and* `Data.txt.sha512` where the content links hold hashes for the same file. Check all `ExternalData_URL_TEMPLATES` entries in order for all available hashes. The data acquisition is considered a failure if none of the available URL resources has any of the given hashes. This makes it possible to have multiple data server resources where all servers do not support all hashing algorithms.
This commit is contained in:
committed by
Brad King
parent
96f6fe6b57
commit
33a9aaa89b
@@ -45,6 +45,8 @@ ExternalData_Add_Test(Data1
|
||||
-D Meta=DATA{MetaTop.dat,REGEX:Meta[ABC].dat}
|
||||
-D Directory=DATA{Directory/,A.dat,REGEX:[BC].dat}
|
||||
-D DirRecurse=DATA{DirRecurse/,RECURSE:,A.dat,REGEX:[BC].dat}
|
||||
-D MultipleAlgorithmNoSHA1=DATA{MultipleAlgorithmNoSHA1.dat}
|
||||
-D MultipleAlgorithmNoMD5=DATA{MultipleAlgorithmNoMD5.dat}
|
||||
-D "Semicolons=DATA{Data.dat}\\;DATA{Data.dat}"
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/Data1Check.cmake
|
||||
)
|
||||
|
||||
1
Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.md5
Normal file
1
Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.md5
Normal file
@@ -0,0 +1 @@
|
||||
29848e54a4d0343f138ab14419b863de
|
||||
@@ -0,0 +1 @@
|
||||
2af59a7022024974f3b8521b7ed8137c996a79f1
|
||||
@@ -0,0 +1 @@
|
||||
08cfcf221f76ace7b906b312284e73d7
|
||||
@@ -0,0 +1 @@
|
||||
223b134e6e3a9bf34aa7531c009d97cff6b0d8a3
|
||||
Reference in New Issue
Block a user