Commit 44e49d90 authored by Dave Demarle's avatar Dave Demarle

ENH: Switch to the new XDMF library.

parent 33d8d6b3
PROJECT(Xdmf)
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
IF (PARAVIEW_USE_MPI)
SET(XDMF_BUILD_MPI 1)
ELSE (PARAVIEW_USE_MPI)
SET(XDMF_BUILD_MPI 0)
ENDIF (PARAVIEW_USE_MPI)
SET(XDMF_BUILD_VTK 1)
SET(HDF5_LIBRARY ${PARAVIEW_HDF5_LIBRARIES})
IF(VTK_USE_SYSTEM_EXPAT)
SET(XDMF_EXPAT_LIBRARIES ${EXPAT_LIBRARY})
ELSE(VTK_USE_SYSTEM_EXPAT)
SET(XDMF_EXPAT_LIBRARIES vtkexpat)
ENDIF(VTK_USE_SYSTEM_EXPAT)
SET(XDMF_USE_ANSI_STDLIB ${PARAVIEW_USE_ANSI_STDLIB})
IF(NOT XDMF_INSTALL_LIB_DIR)
SET(XDMF_INSTALL_LIB_DIR /lib)
ENDIF(NOT XDMF_INSTALL_LIB_DIR)
IF(NOT XDMF_INSTALL_INCLUDE_DIR)
SET(XDMF_INSTALL_INCLUDE_DIR /include/Xdmf)
ENDIF(NOT XDMF_INSTALL_INCLUDE_DIR)
IF(NOT XDMF_INSTALL_INCLUDE_VTK_DIR)
SET(XDMF_INSTALL_INCLUDE_VTK_DIR /include/XdmfVtk)
ENDIF(NOT XDMF_INSTALL_INCLUDE_VTK_DIR)
# Let parent project set XDMF_INSTALL_NO_DEVELOPMENT or
# XDMF_INSTALL_NO_RUNTIME to remove components from the installation.
SET(XDMF_INSTALL_NO_LIBRARIES)
IF(BUILD_SHARED_LIBS)
IF(XDMF_INSTALL_NO_RUNTIME AND XDMF_INSTALL_NO_DEVELOPMENT)
SET(XDMF_INSTALL_NO_LIBRARIES 1)
ENDIF(XDMF_INSTALL_NO_RUNTIME AND XDMF_INSTALL_NO_DEVELOPMENT)
ELSE(BUILD_SHARED_LIBS)
IF(XDMF_INSTALL_NO_DEVELOPMENT)
SET(XDMF_INSTALL_NO_LIBRARIES 1)
ENDIF(XDMF_INSTALL_NO_DEVELOPMENT)
ENDIF(BUILD_SHARED_LIBS)
IF(EXISTS "${HDF5_CONFIG}")
INCLUDE("${HDF5_CONFIG}")
ADD_DEFINITIONS(${HDF5_EXTRA_FLAGS})
ENDIF(EXISTS "${HDF5_CONFIG}")
OPTION(XDMF_HAS_NDGM "XDMF has Network Distributed Global Memory (NDGM)" OFF)
MARK_AS_ADVANCED(XDMF_HAS_NDGM)
IF(XDMF_HAS_NDGM)
OPTION(XDMF_HAS_NDGM_SOURCE "XDMF has Network Distributed Global Memory (NDGM) Source" OFF)
IF(XDMF_HAS_NDGM_SOURCE)
FIND_PATH(NDGM_DIR BuildNDGM.cmake ${Xdmf_SOURCE_DIR}/../Ndgm "Root of Source for NDGM")
IF(NDGM_DIR)
MESSAGE(STATUS "......Process NDGM Source")
INCLUDE(${NDGM_DIR}/BuildNDGM.cmake)
#SUBDIRS(NDGM)
INCLUDE_DIRECTORIES(${NDGM_DIR}/libsrc)
SET(NDGM_LIBRARY ndgm)
ENDIF(NDGM_DIR)
ELSE(XDMF_HAS_NDGM_SOURCE)
MESSAGE(STATUS "......Looking for NDGM_INCLUDE_DIR")
FIND_PATH(NDGM_INCLUDE_DIR Ndgm ${Xdmf_SOURCE_DIR}/../Ndgm/libsrc "Include Directory for NDGM; Resolves #include <Ndgm/ndgm.h>")
MESSAGE(STATUS "......Looking for NDGM_LIBRARY")
FIND_LIBRARY(NDGM_LIBRARY ndgm ${LIBRARY_OUTPUT_PATH})
INCLUDE_DIRECTORIES(${NDGM_INCLUDE_DIR})
SET(NDGM_LIBRARY ${NDGM_LIBRARY})
ENDIF(XDMF_HAS_NDGM_SOURCE)
SET(HAVE_NDGM 1)
ENDIF(XDMF_HAS_NDGM)
MAKE_DIRECTORY(${Xdmf_BINARY_DIR}/Ice)
INCLUDE_DIRECTORIES(
${Xdmf_SOURCE_DIR}/Ice
${Xdmf_BINARY_DIR}/Ice
${Xdmf_SOURCE_DIR}/libsrc
${Xdmf_BINARY_DIR}/libsrc
${Xdmf_SOURCE_DIR}/vtk
${Xdmf_BINARY_DIR}/vtk
${VTK_INCLUDE_DIR}
${VTKEXPAT_INCLUDE_DIR}
${ParaView_SOURCE_DIR}/VTK/Utilities
${ParaView_BINARY_DIR}/VTK/Utilities
${ParaView_BINARY_DIR}/VTK/Utilities/vtklibxml2
${HDF5_INCLUDE_DIR}
)
SUBDIRS(Ice)
SUBDIRS(libsrc)
SUBDIRS(vtk)
Copyright (c) 2002 U.S. Army Research Laboratory
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the U.S. Army Research Laboratory nor the names
of any contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
* Modified source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PROJECT(ICE)
# Version
SET(ICE_YEAR 03)
SET(ICE_MONTH 08)
SET(ICE_VERSION
"${ICE_YEAR}.${ICE_MONTH}")
# System to Build
STRING(REGEX REPLACE "-" "_" ICE_SYSTEM ${CMAKE_SYSTEM_NAME})
SET(ARCH_TO_BUILD ${ICE_SYSTEM} CACHE INTERNAL "Host Arcitecture : Linux IRIXN32 IRIX64 AIX CYGWIN")
# Allow the user to customize their build with some local options
#
ADD_DEFINITIONS(-D${ARCH_TO_BUILD})
MESSAGE(STATUS "Finding Atomic Data Sizes")
SET(ICE_SIZEOF_CHAR ${CMAKE_SIZEOF_CHAR})
SET(ICE_SIZEOF_DOUBLE ${CMAKE_SIZEOF_DOUBLE})
SET(ICE_SIZEOF_FLOAT ${CMAKE_SIZEOF_FLOAT})
SET(ICE_SIZEOF_INT ${CMAKE_SIZEOF_INT})
SET(ICE_SIZEOF_LONG ${CMAKE_SIZEOF_LONG})
SET(ICE_SIZEOF_SHORT ${CMAKE_SIZEOF_SHORT})
INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
MESSAGE(STATUS "Finding a 64 Bit Integer")
IF(WIN32)
CHECK_TYPE_SIZE(__int64 SIZEOF___INT64)
ENDIF(WIN32)
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL)
# Don't Really Need to check these ...
SET(ICE_VOID_VALID 1)
SET(ICE_VOID "void")
SET(ICE_PTR_VALID 1)
SET(ICE_PTR "void *")
SET(ICE_CHAR_VALID 1)
SET(ICE_CHAR "char")
SET(ICE_8_INT_VALID 1)
SET(ICE_8_INT "char")
SET(ICE_8_U_INT "unsigned char")
SET(ICE_16_INT_VALID 1)
SET(ICE_16_INT "short")
SET(ICE_16_U_INT "unsigned short")
# These should be Valid
IF(${ICE_SIZEOF_FLOAT} MATCHES 4)
SET(ICE_32_FLOAT_VALID 1)
SET(ICE_FLOAT "float")
SET(ICE_32_FLOAT "float")
ELSE (${ICE_SIZEOF_FLOAT} MATCHES 4)
MESSAGE(SEND_ERROR "Can't Find a 32 Bit Float")
ENDIF (${ICE_SIZEOF_FLOAT} MATCHES 4)
IF(${ICE_SIZEOF_DOUBLE} MATCHES 8)
SET(ICE_64_FLOAT_VALID 1)
SET(ICE_DOUBLE "double")
SET(ICE_64_FLOAT "double")
ELSE (${ICE_SIZEOF_DOUBLE} MATCHES 8)
MESSAGE(SEND_ERROR "Can't Find a 64 Bit Float")
ENDIF (${ICE_SIZEOF_DOUBLE} MATCHES 8)
# These are sometimes different
IF(${ICE_SIZEOF_INT} MATCHES 4)
SET(ICE_32_INT_VALID 1)
SET(ICE_32_INT "int")
SET(ICE_32_U_INT "unsigned int")
SET(ICE_32_S_INT "int")
ELSE (${ICE_SIZEOF_INT} MATCHES 4)
IF(${ICE_SIZEOF_LONG} MATCHES 4)
SET(ICE_32_INT_VALID 1)
SET(ICE_32_INT "long")
SET(ICE_32_U_INT "unsigned long")
SET(ICE_32_S_INT "long")
ELSE(${ICE_SIZEOF_LONG} MATCHES 4)
MESSAGE(SEND_ERROR "Can't Find a 32 Bit Integer")
ENDIF(${ICE_SIZEOF_LONG} MATCHES 4)
ENDIF(${ICE_SIZEOF_INT} MATCHES 4)
INCLUDE(${CMAKE_ROOT}/Modules/TestForANSIStreamHeaders.cmake)
INCLUDE(${Xdmf_SOURCE_DIR}/CMake/CheckFor64BitStreams.cmake)
CHECK_FOR_64BIT_STREAMS(ICE_HAVE_64BIT_STREAMS)
# Find include files
FIND_PATH(ICE_HAVE_FCNTL fcntl.h /usr/include /usr/include/sys)
FIND_PATH(ICE_HAVE_NETINET in.h /usr/include/netinet /usr/include /usr/include/sys)
FIND_PATH(ICE_HAVE_MMAN mman.h /usr/include/sys /usr/include)
MARK_AS_ADVANCED(ICE_HAVE_FCNTL ICE_HAVE_NETINET ICE_HAVE_MMAN)
#Create IceConfig.h
CONFIGURE_FILE(
${ICE_SOURCE_DIR}/IceConfig.h.in
${ICE_BINARY_DIR}/IceConfig.h
)
IF(NOT XDMF_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(${XDMF_INSTALL_INCLUDE_DIR} .h IceConfig ice)
ENDIF(NOT XDMF_INSTALL_NO_DEVELOPMENT)
/********************************************************/
/* */
/* ICE Host Dependent Configuration File */
/* Automatically Generated by CMake */
/* */
/* */
/* ICE Host Dependent Configuration File */
/* Automatically Generated by CMake */
/* */
/********************************************************/
#ifndef __ICE_CONFIG
......@@ -26,62 +26,62 @@
#cmakedefine ICE_VOID_VALID
#ifndef ICE_VOID_VALID
/* Force an Error */
#error ICE_VOID not defined
/* Force an Error */
#error ICE_VOID not defined
#endif
#define ICE_VOID @ICE_VOID@
#cmakedefine ICE_PTR_VALID
#ifndef ICE_PTR_VALID
/* Force an Error */
#error ICE_PTR not defined
/* Force an Error */
#error ICE_PTR not defined
#endif
#define ICE_PTR @ICE_PTR@
#cmakedefine ICE_CHAR_VALID
#ifndef ICE_CHAR_VALID
/* Force an Error */
#error ICE_CHAR not defined
/* Force an Error */
#error ICE_CHAR not defined
#endif
#define ICE_CHAR @ICE_CHAR@
#cmakedefine ICE_8_INT_VALID
#ifndef ICE_8_INT_VALID
/* Force an Error */
#error ICE_8_INT not defined
/* Force an Error */
#error ICE_8_INT not defined
#endif
#define ICE_8_INT @ICE_8_INT@
#define ICE_8_U_INT @ICE_8_U_INT@
#define ICE_8_INT @ICE_8_INT@
#define ICE_8_U_INT @ICE_8_U_INT@
#cmakedefine ICE_16_INT_VALID
#ifndef ICE_16_INT_VALID
/* Force an Error */
#error ICE_16_INT not defined
/* Force an Error */
#error ICE_16_INT not defined
#endif
#define ICE_16_INT @ICE_16_INT@
#define ICE_16_U_INT @ICE_16_U_INT@
#define ICE_16_INT @ICE_16_INT@
#define ICE_16_U_INT @ICE_16_U_INT@
#cmakedefine ICE_32_INT_VALID
#ifndef ICE_32_INT_VALID
/* Force an Error */
#error ICE_32_INT not defined
/* Force an Error */
#error ICE_32_INT not defined
#endif
#define ICE_32_INT @ICE_32_INT@
#define ICE_32_U_INT @ICE_32_U_INT@
#define ICE_32_S_INT @ICE_32_S_INT@
#define ICE_32_INT @ICE_32_INT@
#define ICE_32_U_INT @ICE_32_U_INT@
#define ICE_32_S_INT @ICE_32_S_INT@
#cmakedefine ICE_32_FLOAT_VALID
#ifndef ICE_32_FLOAT_VALID
/* Force an Error */
#error ICE_32_FLOAT not defined
/* Force an Error */
#error ICE_32_FLOAT not defined
#endif
#define ICE_32_FLOAT @ICE_32_FLOAT@
#define ICE_FLOAT @ICE_32_FLOAT@
#cmakedefine ICE_64_FLOAT_VALID
#ifndef ICE_64_FLOAT_VALID
/* Force an Error */
#error ICE_64_FLOAT not defined
/* Force an Error */
#error ICE_64_FLOAT not defined
#endif
#define ICE_64_FLOAT @ICE_64_FLOAT@
#define ICE_DOUBLE @ICE_64_FLOAT@
......
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