mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-14 23:50:05 +08:00
38 lines
669 B
CMake
38 lines
669 B
CMake
set(
|
|
UCHARDET_TEST_SOURCES
|
|
uchardet-tests.c
|
|
)
|
|
|
|
add_executable(
|
|
uchardet-tests
|
|
${UCHARDET_TEST_SOURCES}
|
|
)
|
|
|
|
target_link_libraries(
|
|
uchardet-tests
|
|
libuchardet
|
|
)
|
|
|
|
set_target_properties(
|
|
uchardet-tests
|
|
PROPERTIES
|
|
LINKER_LANGUAGE
|
|
C
|
|
OUTPUT_NAME
|
|
uchardet-tests
|
|
)
|
|
|
|
# Iterate through all langs.
|
|
file(GLOB dirs "[a-z][a-z]")
|
|
foreach(dir ${dirs})
|
|
get_filename_component(lang ${dir} NAME)
|
|
file(GLOB files "${dir}/*")
|
|
# Iterate through all files.
|
|
foreach(file ${files})
|
|
get_filename_component(charset ${file} NAME_WE)
|
|
add_test(NAME "${lang}:${charset}"
|
|
COMMAND uchardet-tests ${file})
|
|
endforeach()
|
|
endforeach()
|
|
|