[trunk] workaround to make MD5 work under valgrind on MacOSX (fixes issue 410)
This commit is contained in:
parent
7280263988
commit
d47f7a249d
|
@ -41,23 +41,13 @@ endif()
|
||||||
file(READ ${REFFILE} variable)
|
file(READ ${REFFILE} variable)
|
||||||
|
|
||||||
foreach(pgxfullpath ${globfiles})
|
foreach(pgxfullpath ${globfiles})
|
||||||
|
file(MD5 ${pgxfullpath} output)
|
||||||
get_filename_component(pgxfile ${pgxfullpath} NAME)
|
get_filename_component(pgxfile ${pgxfullpath} NAME)
|
||||||
execute_process(
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E md5sum ${pgxfile}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Temporary
|
|
||||||
RESULT_VARIABLE res
|
|
||||||
OUTPUT_VARIABLE output
|
|
||||||
ERROR_VARIABLE error_output
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE # important
|
|
||||||
)
|
|
||||||
|
|
||||||
# Pass the output back to ctest
|
|
||||||
if(res)
|
|
||||||
message(SEND_ERROR "md5 could not be computed, it failed with value ${res}. Output was: ${error_output}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
string(REGEX MATCH "[0-9a-f]+ ${pgxfile}" output_var "${variable}")
|
string(REGEX MATCH "[0-9a-f]+ ${pgxfile}" output_var "${variable}")
|
||||||
|
|
||||||
|
set(output "${output} ${pgxfile}")
|
||||||
|
|
||||||
if("${output_var}" STREQUAL "${output}")
|
if("${output_var}" STREQUAL "${output}")
|
||||||
message(STATUS "equal: [${output_var}] vs [${output}]")
|
message(STATUS "equal: [${output_var}] vs [${output}]")
|
||||||
else()
|
else()
|
||||||
|
|
Loading…
Reference in New Issue