From 8fb55653d11f676948f98a3e057395660ba873fa Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Fri, 29 Jan 2016 08:25:14 -0600 Subject: [PATCH] [libpng16] cmake: Sort test file lists for consistency --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 958ac4bbf..f6ff11645 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -505,19 +505,20 @@ function(png_add_test) endfunction() if(PNG_TESTS AND PNG_SHARED) + # Find test PNG files by globbing, but sort lists to ensure + # consistency between different filesystems. file(GLOB PNGSUITE_PNGS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/*.png") - + list(SORT PNGSUITE_PNGS) file(GLOB TEST_PNGS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/testpngs/*.png") + list(SORT TEST_PNGS) set(PNGTEST_PNG "${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png") - # does not work with msvc due to png_lib_ver issue add_executable(pngtest ${pngtest_sources}) target_link_libraries(pngtest png) png_add_test(NAME pngtest COMMAND pngtest FILES "${PNGTEST_PNG}") - # add_executable(pngvalid ${pngvalid_sources}) target_link_libraries(pngvalid png) @@ -598,6 +599,8 @@ if(PNG_TESTS AND PNG_SHARED) list(APPEND PNGSTEST_FILES "${test_png}") endif() endforeach() + # Should already be sorted, but sort anyway to be certain. + list(SORT PNGSTEST_FILES) png_add_test(NAME pngstest-${gamma_type}-${alpha_type} COMMAND pngstest OPTIONS --tmpfile "${gamma_type}-${alpha_type}-" --log