]> Creatis software - gdcm.git/blobdiff - Testing/CMakeLists.txt
* src/gdcmDictSet.h : set the method BuildDictPath in public
[gdcm.git] / Testing / CMakeLists.txt
index 0d1d911ec323d7d3b0546899f2fe8b4fad071e7a..9e49ddfcec1331f85bf07c8529b4df341d76b777 100644 (file)
@@ -2,6 +2,14 @@
 # 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)
+
+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
@@ -17,9 +25,28 @@ INCLUDE_DIRECTORIES(
   ${GDCM_SOURCE_DIR}/src/
 )
 
+<<<<<<< CMakeLists.txt
+SET(dcm2acr_SOURCES
+  dcm2acr.cxx
+)
+ADD_EXECUTABLE(dcm2acr ${dcm2acr_SOURCES})
+
+SET(explDICOMDIR_SOURCES
+  explDICOMDIR.cxx
+)
+ADD_EXECUTABLE(explDICOMDIR ${explDICOMDIR_SOURCES})
+=======
 # Loop over files and create executables
 FOREACH(file ${TEST_SOURCES})
+  #Doh ! I need to specify each time the compile flags !
+  IF(GDCM_TEST_COMPILE_FLAGS)
+  SET_SOURCE_FILES_PROPERTIES(${file}
+    PROPERTIES
+    COMPILE_FLAGS ${GDCM_TEST_COMPILE_FLAGS}
+  )
+  ENDIF(GDCM_TEST_COMPILE_FLAGS)
   GET_FILENAME_COMPONENT(name ${file} NAME_WE)
   ADD_EXECUTABLE(${name} ${file})
-  TARGET_LINK_LIBRARIES(gdcm)
+  TARGET_LINK_LIBRARIES(${name} gdcm)
 ENDFOREACH(file ${TEST_SOURCES})
+>>>>>>> 1.4