X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FCMakeLists.txt;h=feb6a09012359f1ca0d2a447868abbdc3b186a5d;hb=b7518dc8f2304a666cafac4b1b18ac7d81983555;hp=aff9d67aaf65cbac9c5a86500a9987fec10f9562;hpb=b0745f542bc5ff8332c1f8445e7181279d12aefe;p=gdcm.git diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index aff9d67a..feb6a090 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -2,27 +2,40 @@ # http://www.cmake.org/pipermail/cmake/2001-November/002491.html # So that dll is copied to each subdir where needed -INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) -CHECK_INCLUDE_FILE("stdint.h" CMAKE_HAVE_STDINT_H) +SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH}) -IF(NOT CMAKE_HAVE_STDINT_H) - SET(GDCM_TEST_COMPILE_FLAGS "-DHAVE_NO_STDINT_H") -ENDIF(NOT CMAKE_HAVE_STDINT_H) +SET(GDCM_TESTS ${CXX_TEST_PATH}/gdcmTests) + +#INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) +#CHECK_INCLUDE_FILE("stdint.h" CMAKE_HAVE_STDINT_H) + +#IF(NOT CMAKE_HAVE_STDINT_H) +# SET(GDCM_TEST_COMPILE_FLAGS "-DHAVE_NO_STDINT_H") +#ENDIF(NOT CMAKE_HAVE_STDINT_H) SET(TEST_SOURCES - PrintHeader.cxx - testWrite.cxx - testChangeEntete.cxx + PrintHeader.cxx #require test.acr + bug1.cxx #require test.acr + dcm2acr.cxx #require test.acr hashtest.cxx - bug1.cxx - pourFindTaggs.cxx - dcm2acr.cxx + makeDicomDir.cxx + testDicomDir.cxx + testWrite.cxx ) +IF (GDCM_DATA_ROOT) + # add tests that require data + SET(TEST_SOURCES ${TEST_SOURCES} + PrintDicomDir.cxx + pourFindTaggs.cxx + testChangeEntete.cxx + ) +ENDIF (GDCM_DATA_ROOT) # include stuff INCLUDE_DIRECTORIES( ${GDCM_SOURCE_DIR}/src/ + ${GDCM_BINARY_DIR}/ ) # Loop over files and create executables @@ -35,6 +48,11 @@ FOREACH(file ${TEST_SOURCES}) ) ENDIF(GDCM_TEST_COMPILE_FLAGS) GET_FILENAME_COMPONENT(name ${file} NAME_WE) - ADD_EXECUTABLE(${name} ${file}) - TARGET_LINK_LIBRARIES(${name} gdcm) + ADD_TEST(${name} ${GDCM_TESTS} ${name}) ENDFOREACH(file ${TEST_SOURCES}) + + +ADD_EXECUTABLE(gdcmTests gdcmTests.cxx ${TEST_SOURCES}) +TARGET_LINK_LIBRARIES(gdcmTests gdcm) + +