]> Creatis software - gdcm.git/commitdiff
ENH: 1. Now the test suite is working for real
authormalaterre <malaterre>
Thu, 29 Apr 2004 03:43:24 +0000 (03:43 +0000)
committermalaterre <malaterre>
Thu, 29 Apr 2004 03:43:24 +0000 (03:43 +0000)
2. All binaries are now output in the gdcm-bin directory (this was not true before)

CMakeLists.txt
Testing/CMakeLists.txt

index 661efb196600b66c48c593b6722aa1883366497a..a3ab0d5c34551ead0c67316de9d4a402a748fcb0 100644 (file)
@@ -31,15 +31,15 @@ SET(GDCM_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
 #-----------------------------------------------------------------------------\r
 # Output directories.\r
 #Put all stuff in one single dir for Win32, otherwise dll are a pain:\r
-IF(WIN32 AND GDCM_BUILD_SHARED_LIBS)\r
-  SET(OUTPUT_LIB_DIR ${GDCM_SOURCE_DIR}/bin)\r
-ELSE(WIN32 AND GDCM_BUILD_SHARED_LIBS)\r
-  SET(OUTPUT_LIB_DIR ${GDCM_SOURCE_DIR}/lib)\r
-ENDIF(WIN32 AND GDCM_BUILD_SHARED_LIBS)\r
-\r
-SET (EXECUTABLE_OUTPUT_PATH ${GDCM_SOURCE_DIR}/bin CACHE PATH "Single output directory for building all executables.")\r
-SET (LIBRARY_OUTPUT_PATH ${OUTPUT_LIB_DIR} CACHE PATH "Single output directory for building all libraries.")\r
-MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)\r
+#IF(WIN32 AND GDCM_BUILD_SHARED_LIBS)\r
+#  SET(OUTPUT_LIB_DIR ${GDCM_SOURCE_DIR}/bin)\r
+#ELSE(WIN32 AND GDCM_BUILD_SHARED_LIBS)\r
+#  SET(OUTPUT_LIB_DIR ${GDCM_SOURCE_DIR}/lib)\r
+#ENDIF(WIN32 AND GDCM_BUILD_SHARED_LIBS)\r
+\r
+#SET (EXECUTABLE_OUTPUT_PATH ${GDCM_SOURCE_DIR}/bin CACHE PATH "Single output directory for building all executables.")\r
+#SET (LIBRARY_OUTPUT_PATH ${OUTPUT_LIB_DIR} CACHE PATH "Single output directory for building all libraries.")\r
+#MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)\r
 SET(GDCM_LIBRARY_PATH "${LIBRARY_OUTPUT_PATH}")\r
 SET(GDCM_EXECUTABLE_PATH "${EXECUTABLE_OUTPUT_PATH}")\r
 \r
index 4f427f562eba228c0e94f5fabd27bbca5c18841f..11661d05ae2a1b3adbe507dc32eb3a4cb603a2cc 100644 (file)
@@ -1,35 +1,29 @@
-# TODO:
-# http://www.cmake.org/pipermail/cmake/2001-November/002491.html
-# So that dll is copied to each subdir where needed
+# CMakeLists for Testing purpose
+# Cxx file that need a file to run should be place aproprietly
 
 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)
-
-#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}/gdcmCxxTests)
 
+# add test that does not require data:
+# They usally return if no argument is given
 SET(TEST_SOURCES
-  PrintHeader.cxx #require test.acr
-  bug1.cxx        #require test.acr
-  dcm2acr.cxx     #require test.acr
+  bug1.cxx
+  dcm2acr.cxx
   hashtest.cxx
-  makeDicomDir.cxx
-  testDicomDir.cxx
   testWrite.cxx
 )
 
 # add tests that require data
 IF (GDCM_DATA_ROOT)
 SET(TEST_SOURCES ${TEST_SOURCES}     
+  PrintHeader.cxx     #require test.acr
   PrintDicomDir.cxx
   pourFindTaggs.cxx
   testChangeEntete.cxx
+  testDicomDir.cxx    #require DICOMDIR
+# Disable makeDicomDir for now
+#  makeDicomDir.cxx    #require test.acr
 )
 ENDIF (GDCM_DATA_ROOT)
 
@@ -45,9 +39,6 @@ TARGET_LINK_LIBRARIES(gdcmCxxTests gdcm)
 SET (TestsToRun ${Tests})
 REMOVE (TestsToRun gdcmCxxTests.cxx)
 
-#ADD_EXECUTABLE(gdcmTests gdcmTests.cxx ${TEST_SOURCES})
-#TARGET_LINK_LIBRARIES(gdcmTests gdcm)
-
 # Loop over files and create executables
 FOREACH(file ${TEST_SOURCES})
   GET_FILENAME_COMPONENT(name ${file} NAME_WE)