mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Test both the dynamic and the static library
This commit is contained in:
parent
e5cd0e4ee8
commit
eabaf54d74
@ -21,11 +21,14 @@ if(NOT EXISTS ${BWIPP_PS})
|
|||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tools)
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tools)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(testcommon testcommon.c testcommon.h)
|
set(testcommon_SRCS testcommon.c testcommon.h)
|
||||||
|
|
||||||
|
add_library(testcommon ${testcommon_SRCS})
|
||||||
|
target_link_libraries(testcommon zint)
|
||||||
|
|
||||||
if(ZINT_STATIC)
|
if(ZINT_STATIC)
|
||||||
target_link_libraries(testcommon zint-static)
|
add_library(testcommon-static ${testcommon_SRCS})
|
||||||
else()
|
target_link_libraries(testcommon-static zint-static)
|
||||||
target_link_libraries(testcommon zint)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
macro(zint_add_test test_name test_command)
|
macro(zint_add_test test_name test_command)
|
||||||
@ -33,6 +36,11 @@ macro(zint_add_test test_name test_command)
|
|||||||
add_executable(${test_command} ${test_command}.c)
|
add_executable(${test_command} ${test_command}.c)
|
||||||
target_link_libraries(${test_command} testcommon ${ADDITIONAL_LIBS})
|
target_link_libraries(${test_command} testcommon ${ADDITIONAL_LIBS})
|
||||||
add_test(${test_name} ${test_command})
|
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()
|
endmacro()
|
||||||
|
|
||||||
zint_add_test(2of5 test_2of5)
|
zint_add_test(2of5 test_2of5)
|
||||||
|
Loading…
Reference in New Issue
Block a user