2020-08-05 09:22:26 +12:00
|
|
|
# Copyright (C) 2020 Robin Stuart <rstuart114@gmail.com>
|
|
|
|
# Adapted from qrencode/tests/CMakeLists.txt
|
|
|
|
# Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org>
|
|
|
|
# vim: set ts=4 sw=4 et :
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.9)
|
2020-10-04 10:51:08 +13:00
|
|
|
project(zint_frontend_tests)
|
2020-08-05 09:22:26 +12:00
|
|
|
|
|
|
|
enable_testing()
|
|
|
|
|
|
|
|
macro(zint_add_test test_name test_command)
|
|
|
|
set(ADDITIONAL_LIBS "${ARGN}" ${LIBRARY_FLAGS})
|
|
|
|
add_executable(${test_command} ${test_command}.c)
|
2021-03-30 03:39:40 +13:00
|
|
|
target_link_libraries(${test_command} testcommon ${ADDITIONAL_LIBS})
|
2020-08-05 09:22:26 +12:00
|
|
|
add_test(${test_name} ${test_command})
|
2021-03-30 03:39:40 +13:00
|
|
|
if(ZINT_STATIC)
|
|
|
|
add_executable(${test_command}-static ${test_command}.c)
|
|
|
|
target_link_libraries(${test_command}-static testcommon-static ${ADDITIONAL_LIBS})
|
|
|
|
add_test(${test_name}-static ${test_command}-static)
|
|
|
|
endif()
|
2020-08-05 09:22:26 +12:00
|
|
|
endmacro()
|
|
|
|
|
2021-03-30 03:39:40 +13:00
|
|
|
zint_add_test(args test_args)
|