CMake/Tests/RunCMake/string/Uuid.cmake

18 lines
660 B
CMake
Raw Normal View History

set(UUID_DNS_NAMESPACE 6ba7b810-9dad-11d1-80b4-00c04fd430c8)
string(UUID WWW_EXAMPLE_COM_MD5_UUID
NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE MD5)
if(NOT WWW_EXAMPLE_COM_MD5_UUID STREQUAL "5df41881-3aed-3515-88a7-2f4a814cf09e")
message(SEND_ERROR
"UUID did not create the expected MD5 result: ${WWW_EXAMPLE_COM_MD5_UUID}")
endif()
string(UUID WWW_EXAMPLE_COM_SHA1_UUID
NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE SHA1 UPPER)
if(NOT WWW_EXAMPLE_COM_SHA1_UUID STREQUAL "2ED6657D-E927-568B-95E1-2665A8AEA6A2")
message(SEND_ERROR
"UUID did not create the expected SHA1 result: ${WWW_EXAMPLE_COM_SHA1_UUID}")
endif()