X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=Testing%2FCMakeLists.txt;h=b097532b2fc1d6d4720d7868aed8ce3de5d599f2;hb=069e8648828a29601e13d68a3452ec50705762cd;hp=d19495f304aecbb714c5b782c6e1322f3be968f2;hpb=2a8a83908a37900ed88d4a8ca49073c7ef4db3d3;p=gdcm.git diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index d19495f3..b097532b 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -8,10 +8,10 @@ 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 - testWrite.cxx + TestBug.cxx + TestDcm2Acr.cxx + TestHash.cxx + TestWrite.cxx ) # add tests that require data @@ -19,9 +19,9 @@ IF (GDCM_DATA_ROOT) SET(TEST_SOURCES ${TEST_SOURCES} PrintHeader.cxx #require test.acr PrintDicomDir.cxx - pourFindTaggs.cxx - testChangeEntete.cxx - testDicomDir.cxx #require DICOMDIR + TestFindTags.cxx + TestChangeHeader.cxx + TestDicomDir.cxx #require DICOMDIR BuildUpDicomDir.cxx TestReadWrite.cxx makeDicomDir.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" )