Commit 0fae716a authored by Dave Demarle's avatar Dave Demarle
Browse files

COMP: Fix standalone compilation and remove dead code (dice, ndgm, and expat...

COMP: Fix standalone compilation and remove dead code (dice, ndgm, and expat not pertinant to xdmf anymore)
parent 0492f573
#-----------------------------------------------------------------------------
MACRO(VTK_THIRD_PARTY_OPTION upper lower)
OPTION(VTK_USE_SYSTEM_${upper} "Use the system's ${lower} library." OFF)
MARK_AS_ADVANCED(VTK_USE_SYSTEM_${upper})
IF(VTK_USE_SYSTEM_${upper})
IF(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/Find${upper}.cmake)
ELSE(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake)
INCLUDE(${VTK_CMAKE_DIR}/Find${upper}.cmake)
ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake)
MARK_AS_ADVANCED(${upper}_INCLUDE_DIR ${upper}_LIBRARY)
IF(${upper}_FOUND)
SET(VTK_${upper}_LIBRARIES ${${upper}_LIBRARIES})
IF("${upper}" MATCHES "^PNG$")
SET(PNG_INCLUDE_DIR ${PNG_PNG_INCLUDE_DIR})
MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR)
ENDIF("${upper}" MATCHES "^PNG$")
ELSE(${upper}_FOUND)
MESSAGE(SEND_ERROR "VTK_USE_SYSTEM_${upper} is ON, but ${upper}_LIBRARY is NOTFOUND.")
ENDIF(${upper}_FOUND)
ELSE(VTK_USE_SYSTEM_${upper})
SET(VTK_${upper}_LIBRARIES vtk${lower})
ENDIF(VTK_USE_SYSTEM_${upper})
ENDMACRO(VTK_THIRD_PARTY_OPTION)
#-----------------------------------------------------------------------------
MACRO(VTK_THIRD_PARTY_INCLUDE upper lower)
IF(VTK_USE_SYSTEM_${upper})
IF(${upper}_INCLUDE_DIR)
SET(VTK_INCLUDE_DIRS_SYSTEM ${VTK_INCLUDE_DIRS_SYSTEM} ${${upper}_INCLUDE_DIR})
ENDIF(${upper}_INCLUDE_DIR)
ELSE(VTK_USE_SYSTEM_${upper})
SET(VTK_INCLUDE_DIRS_SOURCE_TREE ${VTK_INCLUDE_DIRS_SOURCE_TREE}
${VTK_BINARY_DIR}/Utilities/${lower}
${VTK_SOURCE_DIR}/Utilities/${lower}
)
ENDIF(VTK_USE_SYSTEM_${upper})
ENDMACRO(VTK_THIRD_PARTY_INCLUDE)
MACRO(VTK_THIRD_PARTY_INCLUDE2 upper)
IF(VTK_USE_SYSTEM_${upper})
IF(${upper}_INCLUDE_DIR)
SET(VTK_INCLUDE_DIRS_SYSTEM ${VTK_INCLUDE_DIRS_SYSTEM} ${${upper}_INCLUDE_DIR})
ENDIF(${upper}_INCLUDE_DIR)
ENDIF(VTK_USE_SYSTEM_${upper})
ENDMACRO(VTK_THIRD_PARTY_INCLUDE2)
#-----------------------------------------------------------------------------
MACRO(VTK_THIRD_PARTY_SUBDIR upper lower)
IF(NOT VTK_USE_SYSTEM_${upper})
SUBDIRS(${lower})
ENDIF(NOT VTK_USE_SYSTEM_${upper})
ENDMACRO(VTK_THIRD_PARTY_SUBDIR)
#-----------------------------------------------------------------------------
MACRO(VTK_THIRD_PARTY_WARNING_SUPPRESS upper lang)
IF(NOT ${upper}_WARNINGS_ALLOW)
# MSVC uses /w to suppress warnings. It also complains if another
# warning level is given, so remove it.
IF(MSVC)
SET(${upper}_WARNINGS_BLOCKED 1)
STRING(REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " "
CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS}")
SET(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} /w")
ENDIF(MSVC)
# Borland uses -w- to suppress warnings.
IF(BORLAND)
SET(${upper}_WARNINGS_BLOCKED 1)
SET(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -w-")
ENDIF(BORLAND)
# Most compilers use -w to suppress warnings.
IF(NOT ${upper}_WARNINGS_BLOCKED)
SET(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -w")
ENDIF(NOT ${upper}_WARNINGS_BLOCKED)
ENDIF(NOT ${upper}_WARNINGS_ALLOW)
ENDMACRO(VTK_THIRD_PARTY_WARNING_SUPPRESS)
......@@ -8,15 +8,10 @@ CHECK_CXX_SOURCE_RUNS("${XDMF_REQUIRE_LARGE_FILE_SUPPORT_FILE}"
SET(XDMF_REQUIRE_LARGE_FILE_SUPPORT ${CMAKE_REQUIRE_LARGE_FILE_SUPPORT})
SET( XdmfFormatSource
# XdmfCharArray
XdmfArray
XdmfDOM
XdmfDataDesc
XdmfExpression
# XdmfFormat
# XdmfFormatMulti
# XdmfFormatHDF
# XdmfFormatXML
XdmfValues
XdmfValuesXML
XdmfValuesHDF
......@@ -30,15 +25,9 @@ SET( XdmfFormatSource
XdmfDataTransform
XdmfElement
XdmfObject
# XdmfParameter
# XdmfXNode
# XdmfTransform
# XdmfXMLParser
)
SET( XdmfExtraSource
# XdmfTree
# XdmfLlist
XdmfExprLex
XdmfExprYacc
)
......@@ -50,8 +39,6 @@ SET( XdmfModelSource
XdmfGrid
XdmfTopology
XdmfGeometry
# XdmfNDGM
# XdmfRuntime
)
IF(XDMF_BUILD_MPI)
......@@ -59,23 +46,16 @@ IF(XDMF_BUILD_MPI)
ENDIF(XDMF_BUILD_MPI)
SET( XdmfMpiSource
XdmfDsm
XdmfDsmBuffer
XdmfDsmComm
XdmfDsmMsg
XdmfDsmCommMpi
)
SET( XdmfNdgmSource
# H5FDndgm
XdmfDsm
XdmfDsmBuffer
XdmfDsmComm
XdmfDsmMsg
XdmfDsmCommMpi
)
SET( XdmfPythonSource
XdmfPython
)
SET( XdmfTclSource
# XdmfTcl
)
OPTION(XDMF_REGENERATE_WRAPPERS
"Regenerate XdmfPython.cxx XdmfTcl.cxx and XdmfJava.cxx" OFF)
......@@ -198,12 +178,6 @@ CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
CHECK_INCLUDE_FILE(malloc.h XDMF_HAVE_MALLOC_H)
## From Old IceConfig.h.in CMakeLists.txt
# Platform configuration tests.
# INCLUDE(${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityC.cmake)
# INCLUDE(${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
# System to Build
STRING(REGEX REPLACE "-" "_" XDMF_SYSTEM ${CMAKE_SYSTEM_NAME})
......@@ -288,17 +262,6 @@ MARK_AS_ADVANCED(XDMF_HAVE_FCNTL XDMF_HAVE_NETINET XDMF_HAVE_MMAN)
CONFIGURE_FILE(${Xdmf_SOURCE_DIR}/libsrc/XdmfConfig.h.in
${Xdmf_BINARY_DIR}/libsrc/XdmfConfig.h)
# IF(NOT XDMF_EXPAT_HEADER)
# IF(XDMF_BUILD_VTK)
# SET(XDMF_EXPAT_HEADER "vtk_expat.h")
# ELSE(XDMF_BUILD_VTK)
# SET(XDMF_EXPAT_HEADER "expat.h")
# ENDIF(XDMF_BUILD_VTK)
# ENDIF(NOT XDMF_EXPAT_HEADER)
# CONFIGURE_FILE(${Xdmf_SOURCE_DIR}/libsrc/xdmf_expat.h.in
# ${Xdmf_BINARY_DIR}/libsrc/xdmf_expat.h)
IF(NOT WIN32)
ADD_DEFINITIONS(-D_HPUX_SOURCE)
ENDIF(NOT WIN32)
......@@ -311,10 +274,6 @@ ELSE(XDMF_BUILD_MPI)
ADD_DEFINITIONS("-DXDMF_NO_MPI")
ENDIF(XDMF_BUILD_MPI)
IF(XDMF_HAS_NDGM)
SET(XdmfSources ${XdmfSources} ${XdmfNdgmSource})
ENDIF(XDMF_HAS_NDGM)
IF(VTK_BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
SET(LIBTYPE SHARED)
ELSE(VTK_BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
......@@ -330,11 +289,11 @@ IF(XDMF_BUILD_MPI)
TARGET_LINK_LIBRARIES(Xdmf ${MPI_LIBRARY} )
ENDIF(XDMF_BUILD_MPI)
IF(XDMF_HAS_NDGM)
TARGET_LINK_LIBRARIES(Xdmf ${NDGM_LIBRARY} ${NDGM_SERVER_LIBRARY} ${HDF5_LIBRARY} ${XDMF_MPI_LIBRARIES} ${LIBXML2_LIBRARY} ${XDMF_EXPAT_LIBRARIES} ${XDMF_ZLIB_LIBRARIES})
ELSE(XDMF_HAS_NDGM)
TARGET_LINK_LIBRARIES(Xdmf ${HDF5_LIBRARY} ${XDMF_MPI_LIBRARIES} ${LIBXML2_LIBRARY} ${XDMF_EXPAT_LIBRARIES} ${XDMF_ZLIB_LIBRARIES})
ENDIF(XDMF_HAS_NDGM)
TARGET_LINK_LIBRARIES(Xdmf
${HDF5_LIBRARY}
${XDMF_MPI_LIBRARIES}
${LIBXML2_LIBRARY}
${XDMF_ZLIB_LIBRARIES})
OPTION(XDMF_WRAP_PYTHON "Build a Python wrapping interface" OFF)
IF(XDMF_WRAP_PYTHON OR VTK_WRAP_PYTHON)
......@@ -348,10 +307,7 @@ IF(XDMF_WRAP_PYTHON)
ENDIF(NOT BUILD_SHARED_LIBS)
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
ADD_LIBRARY(_Xdmf SHARED ${XdmfPythonSource})
IF(XDMF_HAS_NDGM)
TARGET_LINK_LIBRARIES(_Xdmf ${NDGM_LIBRARY} ${NDGM_SERVER_LIBRARY})
ENDIF(XDMF_HAS_NDGM)
TARGET_LINK_LIBRARIES(_Xdmf Xdmf ${HDF5_LIBRARY} ${EXPAT_LIBRARY} ${XDMF_ZLIB_LIBRARIES})
TARGET_LINK_LIBRARIES(_Xdmf Xdmf ${HDF5_LIBRARY} ${XDMF_ZLIB_LIBRARIES})
IF(WIN32)
TARGET_LINK_LIBRARIES(_Xdmf ${PYTHON_LIBRARY})
ENDIF(WIN32)
......@@ -367,10 +323,7 @@ IF(XDMF_WRAP_TCL)
INCLUDE_DIRECTORIES(${TCL_INCLUDE_PATH})
INCLUDE (${CMAKE_ROOT}/Modules/FindTCL.cmake)
ADD_LIBRARY(XdmfTCL SHARED ${XdmfTclSource})
IF(XDMF_HAS_NDGM)
TARGET_LINK_LIBRARIES(XdmfTCL ${NDGM_LIBRARY} ${NDGM_SERVER_LIBRARY})
ENDIF(XDMF_HAS_NDGM)
TARGET_LINK_LIBRARIES(XdmfTCL Xdmf ${TCL_LIBRARY} ${HDF5_LIBRARY} ${EXPAT_LIBRARY} ${XDMF_ZLIB_LIBRARIES})
TARGET_LINK_LIBRARIES(XdmfTCL Xdmf ${TCL_LIBRARY} ${HDF5_LIBRARY} ${XDMF_ZLIB_LIBRARIES} )
ADD_EXECUTABLE(DummyTCL dummy.cxx)
TARGET_LINK_LIBRARIES(DummyTCL XdmfTCL)
ADD_DEPENDENCIES(XdmfTCL Xdmf)
......@@ -385,16 +338,10 @@ IF(NOT XDMF_INSTALL_NO_DEVELOPMENT)
XdmfConfig
Xdmf
XdmfArrayCopyMacro
XdmfDice
XdmfExport
xdmf_expat
XdmfExpr
${XdmfFormatSource}
${XdmfModelSource})
IF(XDMF_HAS_NDGM)
INSTALL_FILES(${XDMF_INSTALL_INCLUDE_DIR} .h
${XdmfNdgmSource})
ENDIF(XDMF_HAS_NDGM)
ENDIF(NOT XDMF_INSTALL_NO_DEVELOPMENT)
IF(NOT XDMF_INSTALL_NO_LIBRARIES)
......
......@@ -18,18 +18,6 @@
# define isatty _isatty
#endif
#ifndef yylval
#define yylval dice_yylval
extern YYSTYPE dice_yylval;
#endif
#ifndef yywrap
#define yywrap dice_yywrap
#endif
extern "C" int dice_yywrap(void);
/*
#define DiceExprDebug 1
*/
static int
GetPointerFromString( char *_c, void **_ptr ){
XDMF_BIG_INT _p;
......@@ -90,23 +78,14 @@ Index { return INDEX; }
">=" { return GE; }
"!=" { return NE; }
([-+]?[0-9]+) {
#ifdef DiceExprDebug
printf(" Lex got a tokINTEGER\n");
#endif
yylval.IntegerValue = atoi(yytext);
return tokINTEGER;
}
([-+]?[0-9]+|([-+]?[0-9]*\.[0-9]+)([eE][-+]?[0-9]+)?) {
#ifdef DiceExprDebug
printf(" Lex got a FLOAT\n");
#endif
yylval.DoubleValue = atof(yytext);
return lFLOAT;
}
_+[0-9a-zA-Z_]*"_"* {
#ifdef DiceExprDebug
printf(" Lex got an tokARRAY pointer\n");
#endif
if( GetPointerFromString( yytext, &yylval.ArrayPointer ) ){
printf("Bad Pointer Conversion\n");
yylval.ArrayPointer = NULL;
......
......@@ -27,12 +27,6 @@
#include "XdmfH5Driver.h"
#endif
#ifdef HAVE_NDGM
extern "C" {
#include "H5FDndgm.h"
}
#endif
#ifdef WIN32
#define XDMF_HDF5_SIZE_T ssize_t
#else
......@@ -600,7 +594,6 @@ if( DataSetName != NULL ) {
*firstcolon = '\0';
firstcolon++;
if ( ( STRCASECMP( NewName, "FILE" ) == 0 ) ||
( STRCASECMP( NewName, "NDGM" ) == 0 ) ||
( STRCASECMP( NewName, "GASS" ) == 0 ) ||
( STRCASECMP( NewName, "CORE" ) == 0 ) ||
( STRCASECMP( NewName, "DUMMY" ) == 0 ) ) {
......@@ -680,20 +673,8 @@ XdmfDebug("Using Domain " << this->Domain );
return( XDMF_FAIL );
#endif
} else if( STRCASECMP( this->Domain, "NDGM" ) == 0 ) {
#ifdef HAVE_NDGM
XdmfDebug("Using NDGM Interface");
H5FD_ndgm_init();
this->AccessPlist = H5Pcreate( H5P_FILE_ACCESS );
XdmfDebug("Using NdgmHost " << this->GetNdgmHost() );
if( strlen( this->GetNdgmHost() ) < 2 ) {
H5Pset_fapl_ndgm( this->AccessPlist, 1000000, NULL);
} else {
H5Pset_fapl_ndgm( this->AccessPlist, 1000000, (char*)this->GetNdgmHost());
}
#else
XdmfErrorMessage("NDGM Interface is unavailable");
return( XDMF_FAIL );
#endif
} else if( STRCASECMP( this->Domain, "GASS" ) == 0 ) {
} else {
// Check for Parallel HDF5 ... MPI must already be initialized
......@@ -756,20 +737,8 @@ if( this->File < 0 ){
return( XDMF_FAIL );
#endif
} else if( STRCASECMP( this->Domain, "NDGM" ) == 0 ) {
XdmfDebug("Using NDGM Interface");
#ifdef HAVE_NDGM
H5FD_ndgm_init();
this->AccessPlist = H5Pcreate( H5P_FILE_ACCESS );
XdmfDebug("Using NdgmHost " << this->GetNdgmHost() );
if( strlen( this->GetNdgmHost() ) < 2 ) {
H5Pset_fapl_ndgm( this->AccessPlist, 1000000, NULL);
} else {
H5Pset_fapl_ndgm( this->AccessPlist, 1000000, (char*)this->GetNdgmHost() );
}
#else
XdmfErrorMessage("NDGM interface is unavailable");
return( XDMF_FAIL );
#endif
} else if( STRCASECMP( this->Domain, "FILE" ) == 0 ) {
}
this->File = H5Fcreate(this->FileName,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment