From: malaterre Date: Thu, 29 Apr 2004 03:43:24 +0000 (+0000) Subject: ENH: 1. Now the test suite is working for real X-Git-Tag: Version0.5.bp~225 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2943fda916fe14973cda2deddad3fc7dd6fc7d19;p=gdcm.git ENH: 1. Now the test suite is working for real 2. All binaries are now output in the gdcm-bin directory (this was not true before) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 661efb19..a3ab0d5c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,15 +31,15 @@ SET(GDCM_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) #----------------------------------------------------------------------------- # Output directories. #Put all stuff in one single dir for Win32, otherwise dll are a pain: -IF(WIN32 AND GDCM_BUILD_SHARED_LIBS) - SET(OUTPUT_LIB_DIR ${GDCM_SOURCE_DIR}/bin) -ELSE(WIN32 AND GDCM_BUILD_SHARED_LIBS) - SET(OUTPUT_LIB_DIR ${GDCM_SOURCE_DIR}/lib) -ENDIF(WIN32 AND GDCM_BUILD_SHARED_LIBS) - -SET (EXECUTABLE_OUTPUT_PATH ${GDCM_SOURCE_DIR}/bin CACHE PATH "Single output directory for building all executables.") -SET (LIBRARY_OUTPUT_PATH ${OUTPUT_LIB_DIR} CACHE PATH "Single output directory for building all libraries.") -MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) +#IF(WIN32 AND GDCM_BUILD_SHARED_LIBS) +# SET(OUTPUT_LIB_DIR ${GDCM_SOURCE_DIR}/bin) +#ELSE(WIN32 AND GDCM_BUILD_SHARED_LIBS) +# SET(OUTPUT_LIB_DIR ${GDCM_SOURCE_DIR}/lib) +#ENDIF(WIN32 AND GDCM_BUILD_SHARED_LIBS) + +#SET (EXECUTABLE_OUTPUT_PATH ${GDCM_SOURCE_DIR}/bin CACHE PATH "Single output directory for building all executables.") +#SET (LIBRARY_OUTPUT_PATH ${OUTPUT_LIB_DIR} CACHE PATH "Single output directory for building all libraries.") +#MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) SET(GDCM_LIBRARY_PATH "${LIBRARY_OUTPUT_PATH}") SET(GDCM_EXECUTABLE_PATH "${EXECUTABLE_OUTPUT_PATH}") diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index 4f427f56..11661d05 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -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)