mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] cmake: Sort test file lists for consistency
This commit is contained in:
parent
74e481c743
commit
8fb55653d1
@ -505,19 +505,20 @@ function(png_add_test)
|
|||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
if(PNG_TESTS AND PNG_SHARED)
|
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")
|
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")
|
file(GLOB TEST_PNGS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/testpngs/*.png")
|
||||||
|
list(SORT TEST_PNGS)
|
||||||
|
|
||||||
set(PNGTEST_PNG "${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png")
|
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})
|
add_executable(pngtest ${pngtest_sources})
|
||||||
target_link_libraries(pngtest png)
|
target_link_libraries(pngtest png)
|
||||||
|
|
||||||
png_add_test(NAME pngtest COMMAND pngtest FILES "${PNGTEST_PNG}")
|
png_add_test(NAME pngtest COMMAND pngtest FILES "${PNGTEST_PNG}")
|
||||||
|
|
||||||
#
|
|
||||||
add_executable(pngvalid ${pngvalid_sources})
|
add_executable(pngvalid ${pngvalid_sources})
|
||||||
target_link_libraries(pngvalid png)
|
target_link_libraries(pngvalid png)
|
||||||
|
|
||||||
@ -598,6 +599,8 @@ if(PNG_TESTS AND PNG_SHARED)
|
|||||||
list(APPEND PNGSTEST_FILES "${test_png}")
|
list(APPEND PNGSTEST_FILES "${test_png}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
# Should already be sorted, but sort anyway to be certain.
|
||||||
|
list(SORT PNGSTEST_FILES)
|
||||||
png_add_test(NAME pngstest-${gamma_type}-${alpha_type}
|
png_add_test(NAME pngstest-${gamma_type}-${alpha_type}
|
||||||
COMMAND pngstest
|
COMMAND pngstest
|
||||||
OPTIONS --tmpfile "${gamma_type}-${alpha_type}-" --log
|
OPTIONS --tmpfile "${gamma_type}-${alpha_type}-" --log
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user