From 3392d99487fbe089c1d9b84ed7f31ede68de3769 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Fri, 7 Sep 2007 13:49:57 +0000 Subject: [PATCH] BUG: cannot run tests if EXAMPLES are not built --- CMakeLists.txt | 10 ---------- codec/CMakeLists.txt | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ea303b0..18af55c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,14 +102,4 @@ FIND_PATH(JPEG2000_CONFORMANCE_DATA_ROOT testimages.html $ENV{JPEG2000_CONFORMANCE_DATA_ROOT} ) -FILE(GLOB_RECURSE OPENJPEG_DATA_IMAGES_GLOB - "${JPEG2000_CONFORMANCE_DATA_ROOT}/*.j2k" - "${JPEG2000_CONFORMANCE_DATA_ROOT}/*.j2c" - "${JPEG2000_CONFORMANCE_DATA_ROOT}/*.jp2" - ) - -FOREACH(filename ${OPENJPEG_DATA_IMAGES_GLOB}) - GET_FILENAME_COMPONENT(filename_temp ${filename} NAME) - ADD_TEST(j2i-${filename_temp} ${EXECUTABLE_OUTPUT_PATH}/j2k_to_image -i ${filename} -o ${filename_temp}.tif) -ENDFOREACH(filename) diff --git a/codec/CMakeLists.txt b/codec/CMakeLists.txt index 84eb07a1..ecc31bdd 100644 --- a/codec/CMakeLists.txt +++ b/codec/CMakeLists.txt @@ -53,4 +53,15 @@ FOREACH(exe j2k_to_image image_to_j2k) INSTALL_TARGETS(/bin/ ${exe}) ENDFOREACH(exe) +# Do testing here, once we know the examples are being built: +FILE(GLOB_RECURSE OPENJPEG_DATA_IMAGES_GLOB + "${JPEG2000_CONFORMANCE_DATA_ROOT}/*.j2k" + "${JPEG2000_CONFORMANCE_DATA_ROOT}/*.j2c" + "${JPEG2000_CONFORMANCE_DATA_ROOT}/*.jp2" + ) + +FOREACH(filename ${OPENJPEG_DATA_IMAGES_GLOB}) + GET_FILENAME_COMPONENT(filename_temp ${filename} NAME) + ADD_TEST(j2i-${filename_temp} ${EXECUTABLE_OUTPUT_PATH}/j2k_to_image -i ${filename} -o ${filename_temp}.tif) +ENDFOREACH(filename)