2 # http://www.cmake.org/pipermail/cmake/2001-November/002491.html
3 # So that dll is copied to each subdir where needed
5 SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
7 SET(GDCM_TESTS ${CXX_TEST_PATH}/gdcmTests)
9 #INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
10 #CHECK_INCLUDE_FILE("stdint.h" CMAKE_HAVE_STDINT_H)
12 #IF(NOT CMAKE_HAVE_STDINT_H)
13 # SET(GDCM_TEST_COMPILE_FLAGS "-DHAVE_NO_STDINT_H")
14 #ENDIF(NOT CMAKE_HAVE_STDINT_H)
18 PrintHeader.cxx #require test.acr
19 bug1.cxx #require test.acr
20 dcm2acr.cxx #require test.acr
27 # add tests that require data
28 SET(TEST_SOURCES ${TEST_SOURCES}
33 ENDIF (GDCM_DATA_ROOT)
37 ${GDCM_SOURCE_DIR}/src/
41 # Loop over files and create executables
42 FOREACH(file ${TEST_SOURCES})
43 #Doh ! I need to specify each time the compile flags !
44 IF(GDCM_TEST_COMPILE_FLAGS)
45 SET_SOURCE_FILES_PROPERTIES(${file}
47 COMPILE_FLAGS ${GDCM_TEST_COMPILE_FLAGS}
49 ENDIF(GDCM_TEST_COMPILE_FLAGS)
50 GET_FILENAME_COMPONENT(name ${file} NAME_WE)
51 ADD_TEST(${name} ${GDCM_TESTS} ${name})
52 ENDFOREACH(file ${TEST_SOURCES})
55 ADD_EXECUTABLE(gdcmTests gdcmTests.cxx ${TEST_SOURCES})
56 TARGET_LINK_LIBRARIES(gdcmTests gdcm)