From b09051fd79da1101185a73198aac2d65cf2b2450 Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Thu, 30 Jun 2011 13:52:23 +0000 Subject: [PATCH] fixed CTest configuration files --- CHANGES | 3 +++ {testing => CMake}/CTestCustom.cmake.in | 0 CMakeLists.txt | 23 +++++++++++-------- .../CTestConfig.cmake => CTestConfig.cmake | 0 applications/codec/CMakeLists.txt | 1 + 5 files changed, 18 insertions(+), 9 deletions(-) rename {testing => CMake}/CTestCustom.cmake.in (100%) rename testing/CTestConfig.cmake => CTestConfig.cmake (100%) diff --git a/CHANGES b/CHANGES index 5cd44304..252e7d35 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,9 @@ What's New for OpenJPEG ! : changed + : added +June 30, 2011 +! [antonin] fixed CTest configuration files + June 3, 2011 + [malaterre] adding partno and numpart info as part of the warning message (issue #69) + [malaterre] make sure that cmake build system works on debian diff --git a/testing/CTestCustom.cmake.in b/CMake/CTestCustom.cmake.in similarity index 100% rename from testing/CTestCustom.cmake.in rename to CMake/CTestCustom.cmake.in diff --git a/CMakeLists.txt b/CMakeLists.txt index bd73a34d..d8859414 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,8 +111,8 @@ INCLUDE (${OPENJPEG_SOURCE_DIR}/CMake/CheckHaveGetopt.cmake ) #----------------------------------------------------------------------------- # Setup file for setting custom ctest vars CONFIGURE_FILE( - ${CMAKE_SOURCE_DIR}/testing/CTestCustom.cmake.in - ${CMAKE_BINARY_DIR}/testing/CTestCustom.cmake + ${CMAKE_SOURCE_DIR}/CMake/CTestCustom.cmake.in + ${CMAKE_BINARY_DIR}/CTestCustom.cmake @ONLY ) @@ -201,6 +201,14 @@ CONFIGURE_FILE("${OPENJPEG_SOURCE_DIR}/opj_configh.cmake.in" @ONLY ) +#----------------------------------------------------------------------------- +# CDash+CMake : to be updated +OPTION(BUILD_TESTING "Build the tests." OFF) +IF(BUILD_TESTING) + ENABLE_TESTING() + INCLUDE(CTest) +ENDIF(BUILD_TESTING) + #----------------------------------------------------------------------------- # Build Library INCLUDE_DIRECTORIES(BEFORE ${OPENJPEG_BINARY_DIR}) @@ -221,21 +229,18 @@ OPTION(BUILD_JPWL "Build the JPWL library and executables" OFF) ADD_SUBDIRECTORY(doc) #----------------------------------------------------------------------------- -# CDash+CMake : to be updated -OPTION(BUILD_TESTING "Build the tests." OFF) +# Tests data IF(BUILD_TESTING) - ENABLE_TESTING() - INCLUDE(CTest) -ENDIF(BUILD_TESTING) # Adding test with dataset from: -# http://www.crc.ricoh.com/~gormish/jpeg2000conformance/ -# -> wget http://www.crc.ricoh.com/~gormish/jpeg2000conformance/j2kp4files_v1_5.zip +# http://www.openjpeg.org/conformance/j2kp4files_v1_5.zip +# -> wget http://www.openjpeg.org/conformance/j2kp4files_v1_5.zip # http://www.jpeg.org/jpeg2000guide/testimages/testimages.html # Adding JPEG2000_CONFORMANCE_DATA_ROOT FIND_PATH(JPEG2000_CONFORMANCE_DATA_ROOT testimages.html ${OPENJPEG_SOURCE_DIR}/../jpeg2000testimages $ENV{JPEG2000_CONFORMANCE_DATA_ROOT} ) +ENDIF(BUILD_TESTING) #----------------------------------------------------------------------------- # install all targets referenced as OPENJPEGTargets diff --git a/testing/CTestConfig.cmake b/CTestConfig.cmake similarity index 100% rename from testing/CTestConfig.cmake rename to CTestConfig.cmake diff --git a/applications/codec/CMakeLists.txt b/applications/codec/CMakeLists.txt index 44f10872..1a25d310 100644 --- a/applications/codec/CMakeLists.txt +++ b/applications/codec/CMakeLists.txt @@ -133,6 +133,7 @@ foreach(filename ${OPENJPEG_DATA_IMAGES_GLOB}) endforeach(codec_type) foreach(codec_type ppm bmp tif tga png) ADD_TEST(i2j-${filename_temp}-${codec_type} ${EXECUTABLE_OUTPUT_PATH}/image_to_j2k -i ${filename_temp}.${codec_type} -o ${filename_temp}.${codec_type}${filename_ext}) + SET_TESTS_PROPERTIES(i2j-${filename_temp}-${codec_type} PROPERTIES DEPENDS j2i-${filename_temp}-${codec_type}) #if(UNIX) # ADD_TEST(cmp-${filename_temp}-${codec_type} cmp ${filename} ${filename_temp}.${codec_type}${filename_ext}) #endif(UNIX)