mirror of
https://git.code.sf.net/p/zint/code
synced 2025-06-04 16:54:02 -04:00
Factor out the zint_add_test macro
This commit is contained in:
parent
b69df5ad91
commit
3114a6697b
3 changed files with 19 additions and 23 deletions
|
@ -8,16 +8,6 @@ project(zint_frontend_tests)
|
|||
|
||||
enable_testing()
|
||||
|
||||
macro(zint_add_test test_name test_command)
|
||||
set(ADDITIONAL_LIBS "${ARGN}" ${LIBRARY_FLAGS})
|
||||
add_executable(${test_command} ${test_command}.c)
|
||||
target_link_libraries(${test_command} testcommon ${ADDITIONAL_LIBS})
|
||||
add_test(${test_name} ${test_command})
|
||||
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()
|
||||
endmacro()
|
||||
include(${zint-package_SOURCE_DIR}/cmake/zint_add_test.cmake)
|
||||
|
||||
zint_add_test(args test_args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue