[trunk] simplify code using for loop

This commit is contained in:
Mathieu Malaterre 2014-02-27 08:38:55 +00:00
parent ac1dfd4662
commit a7cc5b6a5d
1 changed files with 10 additions and 11 deletions

View File

@ -5,14 +5,13 @@ include_directories(
${OPENJPEG_SOURCE_DIR}/src/lib/openjp2 ${OPENJPEG_SOURCE_DIR}/src/lib/openjp2
) )
add_executable(testempty0 testempty0.c) set(unit_test
add_executable(testempty1 testempty1.c) testempty0
add_executable(testempty2 testempty2.c) testempty1
testempty2
target_link_libraries(testempty0 openjp2) )
target_link_libraries(testempty1 openjp2) foreach(ut ${unit_test})
target_link_libraries(testempty2 openjp2) add_executable(${ut} ${ut}.c)
target_link_libraries(${ut} openjp2)
add_test(NAME testempty0 COMMAND testempty0) add_test(NAME ${ut} COMMAND ${ut})
add_test(NAME testempty1 COMMAND testempty1) endforeach()
add_test(NAME testempty2 COMMAND testempty2)