You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/Tests/RunCMake/CPack/TGZ/PACKAGE_CHECKSUM-VerifyResu...

15 lines
577 B

if(NOT ${RunCMake_SUBTEST_SUFFIX} MATCHES "invalid")
string(TOLOWER ${RunCMake_SUBTEST_SUFFIX} EXTENSION)
file(GLOB PACKAGE RELATIVE ${bin_dir} "*.tar.gz")
file(GLOB CSUMFILE RELATIVE ${bin_dir} "*.${EXTENSION}")
file(STRINGS ${CSUMFILE} CHSUM_VALUE)
file(${RunCMake_SUBTEST_SUFFIX} ${PACKAGE} expected_value )
set(expected_value "${expected_value} ${PACKAGE}")
if(NOT expected_value STREQUAL CHSUM_VALUE)
message(FATAL_ERROR "Generated checksum is not valid! Expected [${expected_value}] Got [${CHSUM_VALUE}]")
endif()
else()
message(${error})
endif()