X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=Testing%2FCMakeLists.txt;h=f722013e4396f85c1fda339afac168b7e6db00a1;hb=0aefbe64c65acfed527a7f18b352a2621f4bc92b;hp=aff9d67aaf65cbac9c5a86500a9987fec10f9562;hpb=b0745f542bc5ff8332c1f8445e7181279d12aefe;p=gdcm.git diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index aff9d67a..f722013e 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -2,6 +2,10 @@ # http://www.cmake.org/pipermail/cmake/2001-November/002491.html # So that dll is copied to each subdir where needed +SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH}) + +SET(GDCM_TESTS ${CXX_TEST_PATH}/gdcmTests) + INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) CHECK_INCLUDE_FILE("stdint.h" CMAKE_HAVE_STDINT_H) @@ -11,18 +15,27 @@ 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) + +