X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FCMakeLists.txt;h=cc1aad0854aeec143401fc0e25bab527c9ccdafb;hb=9beed66b98b296f245317f0b18166c3be96a6b3b;hp=d19495f304aecbb714c5b782c6e1322f3be968f2;hpb=2a8a83908a37900ed88d4a8ca49073c7ef4db3d3;p=gdcm.git diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index d19495f3..cc1aad08 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -8,9 +8,9 @@ SET(GDCM_TESTS ${CXX_TEST_PATH}/gdcmTests) # add test that does not require data: # They usally return if no argument is given SET(TEST_SOURCES - PrintBug.cxx - dcm2acr.cxx - hashtest.cxx + TestBug.cxx + TestDcm2Acr.cxx + TestHash.cxx testWrite.cxx ) @@ -74,18 +74,23 @@ ENDFOREACH(file ${TEST_SOURCES}) # We need to test the reading of all dicom images in the gdcmData directory # First parse this directory and extract all images -# Since there is a bug in cmake 1.8.3, I'll have to do two separate globs -FILE(GLOB GDCM_DATA_IMAGES_GLOB_ACR - "${GDCM_DATA_ROOT}/*.acr" - ) - -FILE(GLOB GDCM_DATA_IMAGES_GLOB_DCM - "${GDCM_DATA_ROOT}/*.dcm" - ) - -SET(GDCM_DATA_IMAGES_GLOB ${GDCM_DATA_IMAGES_GLOB_DCM} ${GDCM_DATA_IMAGES_GLOB_ACR}) - -# Black list of images know to break lots of readers (efilm, xmedcon ...): +IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.9) + FILE(GLOB GDCM_DATA_IMAGES_GLOB + "${GDCM_DATA_ROOT}/*.acr" + "${GDCM_DATA_ROOT}/*.dcm" + ) +ELSE(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.9) + # Since there is a bug in cmake 1.8.3, I'll have to do two separate globs + FILE(GLOB GDCM_DATA_IMAGES_GLOB_ACR + "${GDCM_DATA_ROOT}/*.acr" + ) + FILE(GLOB GDCM_DATA_IMAGES_GLOB_DCM + "${GDCM_DATA_ROOT}/*.dcm" + ) + SET(GDCM_DATA_IMAGES_GLOB ${GDCM_DATA_IMAGES_GLOB_DCM} ${GDCM_DATA_IMAGES_GLOB_ACR}) +ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.9) + +# Black list of images known to break lots of readers (efilm, xmedcon ...): SET(BLACK_LIST "gdcm-JPEG-LossLessThoravision.dcm" ) @@ -101,12 +106,6 @@ FOREACH(filename ${GDCM_DATA_IMAGES_GLOB}) ENDFOREACH(filename) # Populate GDCM_DATA_IMAGES: -FILE(WRITE "${GDCM_BINARY_DIR}/gdcmDataImages.h.in" - "const char * const gdcmDataImages[] = { @GDCM_DATA_IMAGES@ \n 0 };" - ) - -# Generate the header file: -CONFIGURE_FILE( - ${GDCM_BINARY_DIR}/gdcmDataImages.h.in - ${GDCM_BINARY_DIR}/gdcmDataImages.h +FILE(WRITE "${GDCM_BINARY_DIR}/gdcmDataImages.h" + "const char * const gdcmDataImages[] = { ${GDCM_DATA_IMAGES}\n0 };\n" )