From 0aefbe64c65acfed527a7f18b352a2621f4bc92b Mon Sep 17 00:00:00 2001 From: malaterre Date: Sun, 25 Apr 2004 22:43:39 +0000 Subject: [PATCH] Adding a GDCM_DATA_ROOT for testing --- CMakeLists.txt | 29 ++++++++++++++++------------- ChangeLog | 3 +++ Testing/CMakeLists.txt | 1 + Testing/TestChangeHeader.cxx | 1 + gdcmConfigure.h.in | 1 + 5 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 gdcmConfigure.h.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ada9b14..ddb8a400 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,20 +20,13 @@ MARK_AS_ADVANCED(GDCM_DATA_DIR) OPTION(BUILD_SHARED_LIBS "Build GDCM with shared libraries." ON) SET(GDCM_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) -SET(CMAKE_CONFIGURATION_TYPES - Debug - Release -) -SET(CMAKE_BUILD_TYPE_INIT Debug) - -# Deals with problem on SunOS: -# ostrstream vs. ostringstream - -#SET(GDCM_NO_ANSI_STRING_STREAM -# ${CMAKE_NO_ANSI_STRING_STREAM} +#----------------------------------------------------------------------------- +# Does not work as of 2004/04/05 +#SET(CMAKE_CONFIGURATION_TYPES +# Debug +# Release #) -#CONFIGURE_FILE(${GDCM_SOURCE_DIR}/src/gdcmCommon.h.in -# ${GDCM_BINARY_DIR}/src/gdcmCommon.h @ONLY IMMEDIATE) +#SET(CMAKE_BUILD_TYPE_INIT Debug) #----------------------------------------------------------------------------- # Output directories. @@ -66,6 +59,16 @@ FIND_PATH(GDCM_DATA_ROOT gdcm-ACR-LibIDO.acr $ENV{PUB_DICT_PATH}/../../gdcmData ) +#----------------------------------------------------------------------------- +# Deals with problem on SunOS: +# ostrstream vs. ostringstream + +#SET(GDCM_NO_ANSI_STRING_STREAM +# ${CMAKE_NO_ANSI_STRING_STREAM} +#) +CONFIGURE_FILE(${GDCM_SOURCE_DIR}/gdcmConfigure.h.in + ${GDCM_BINARY_DIR}/gdcmConfigure.h @ONLY IMMEDIATE) + #----------------------------------------------------------------------------- # Add the testing directories OPTION(GDCM_BUILD_TESTING "Test the project" ON) diff --git a/ChangeLog b/ChangeLog index b514df3f..d2c05cab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2004-04-25 Mathieu Malaterre + * ENH: Adding a GDCM_DATA_ROOT for testing + 2004-04-25 Mathieu Malaterre * ENH: Adding automatic testing 1. Need a DartConfig.cmake to submit to public diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index 9ff25734..f722013e 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -35,6 +35,7 @@ ENDIF (GDCM_DATA_ROOT) # include stuff INCLUDE_DIRECTORIES( ${GDCM_SOURCE_DIR}/src/ + ${GDCM_BINARY_DIR}/ ) # Loop over files and create executables diff --git a/Testing/TestChangeHeader.cxx b/Testing/TestChangeHeader.cxx index 9dbbf7a3..a84d3b96 100644 --- a/Testing/TestChangeHeader.cxx +++ b/Testing/TestChangeHeader.cxx @@ -69,6 +69,7 @@ int testChangeEntete(int argc, char* argv[]) { sprintf(resultat, "%s.vol", deuxieme.c_str()); printf ("WriteDCM\n"); + //f1->WriteDcmExplVR("itk-gdcm-ex.dcm"); //f1->WriteDcmImplVR(resultat); f1->WriteAcr(resultat); diff --git a/gdcmConfigure.h.in b/gdcmConfigure.h.in new file mode 100644 index 00000000..ad1abfd0 --- /dev/null +++ b/gdcmConfigure.h.in @@ -0,0 +1 @@ +#define GDCM_DATA_ROOT "@GDCM_DATA_ROOT@" -- 2.45.1