X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FCMakeLists.txt;h=68c49b2c18fdb6fb6cb5d5284620ce8700d9a0c2;hb=83d6c83bfcdfa88b7f322286136f802e89d5830c;hp=ac8b9df56505cc012eba9aefeb3c04e6206e900b;hpb=0ce6682a82eacb85233fcccef601f83bb591ec12;p=gdcm.git diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index ac8b9df5..68c49b2c 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -42,18 +42,26 @@ IF (GDCM_DATA_ROOT) ) # add test that require VTK: IF(GDCM_VTK) - # Include the VTK library - INCLUDE(${VTK_USE_FILE}) - - INCLUDE_DIRECTORIES( - ${GDCM_SOURCE_DIR}/vtk/ - ) - SET(TEST_SOURCES ${TEST_SOURCES} - VTKTestRead.cxx - VTKTestReadSeq.cxx - VTKTestWrite.cxx - VTKTestWriteSeq.cxx - ) + IF(${VTK_MAJOR_VERSION} LESS 4) + MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !") + ELSE(${VTK_MAJOR_VERSION} LESS 4) + IF(${VTK_MAJOR_VERSION} EQUAL 4 AND ${VTK_MINOR_VERSION} EQUAL 4 AND ${VTK_BUILD_VERSION} LESS 3) + MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !" + "Although gdcm should compile fine. You just need to turn BUILD_TESTING:=OFF") + ENDIF(${VTK_MAJOR_VERSION} EQUAL 4 AND ${VTK_MINOR_VERSION} EQUAL 4 AND ${VTK_BUILD_VERSION} LESS 3) + # Include the VTK library since we know this is going to work + INCLUDE(${VTK_USE_FILE}) + + INCLUDE_DIRECTORIES( + ${GDCM_SOURCE_DIR}/vtk/ + ) + SET(TEST_SOURCES ${TEST_SOURCES} + VTKTestRead.cxx + VTKTestReadSeq.cxx + VTKTestWrite.cxx + VTKTestWriteSeq.cxx + ) + ENDIF(${VTK_MAJOR_VERSION} LESS 4) ENDIF(GDCM_VTK) ENDIF (GDCM_DATA_ROOT)