From 2d47938b25526e29b88d379057cc9ffa293e6dfd Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Tue, 15 Sep 2015 15:49:58 +0200 Subject: [PATCH] added testempty0 test --- tests/unit/CMakeLists.txt | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index e45b991d..67cf854f 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -1,9 +1,17 @@ -# UNIT TESTS +# UNIT TESTS -add_executable(testempty1 testempty1.c) -add_executable(testempty2 testempty2.c) -target_link_libraries(testempty1 openjpeg) -target_link_libraries(testempty2 openjpeg) +include_directories( + ${OPENJPEG_BINARY_DIR}/libopenjpeg # opj_config.h + ${OPENJPEG_SOURCE_DIR}/libopenjpeg +) -add_test(NAME testempty1 COMMAND testempty1) -add_test(NAME testempty2 COMMAND testempty2) +set(unit_test + testempty0 + testempty1 + testempty2 +) +foreach(ut ${unit_test}) + add_executable(${ut} ${ut}.c) + target_link_libraries(${ut} openjpeg) + add_test(NAME ${ut} COMMAND ${ut}) +endforeach()