Commit fcb58895 authored by Dave Demarle's avatar Dave Demarle
Browse files

ENH: remove xdmf1 not that we have switched to xdmf2

parent bd5f036a
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 */
/* */
/********************************************************/
#ifndef __ICE_CONFIG
#define __ICE_CONFIG
/* what byte order */
#cmakedefine CMAKE_WORDS_BIGENDIAN
#ifdef CMAKE_WORDS_BIGENDIAN
#define ICE_WORDS_BIGENDIAN
#define ICE_BYTE_ORDER_BIG
#else
#define ICE_WORDS_LITTLEENDIAN
#define ICE_BYTE_ORDER_LITTLE
#endif
#define ICE_SYSTEM "@ICE_SYSTEM@"
#define ICE_HOST @ICE_SYSTEM@
#ifndef @ICE_SYSTEM@
#define @ICE_SYSTEM@
#endif
#cmakedefine ICE_VOID_VALID
#ifndef ICE_VOID_VALID
/* 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
#endif
#define ICE_PTR @ICE_PTR@
#cmakedefine ICE_CHAR_VALID
#ifndef ICE_CHAR_VALID
/* 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
#endif
#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
#endif
#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
#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@
#cmakedefine ICE_32_FLOAT_VALID
#ifndef ICE_32_FLOAT_VALID
/* 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
#endif
#define ICE_64_FLOAT @ICE_64_FLOAT@
#define ICE_DOUBLE @ICE_64_FLOAT@
#ifndef SIZEOF___INT64
#cmakedefine SIZEOF___INT64
#endif
#cmakedefine HAVE_STRTOLL
#ifndef SIZEOF_LONG_LONG
#cmakedefine SIZEOF_LONG_LONG
#endif
#if defined( SIZEOF___INT64 )
# define ICE_64_INT __int64
# define HAVE_64_INT
#elif defined( SIZEOF_LONG_LONG )
# define ICE_64_INT long long
# define HAVE_64_INT
# define ICE_have_64_bit_int
#else
# error "64 bit long not defined"
#endif
#cmakedefine ICE_HAVE_64BIT_STREAMS
#ifdef ICE_HAVE_64BIT_STREAMS
#define ICE_64BIT_CAST
#else
#define ICE_64BIT_CAST (long)
#endif
#cmakedefine ICE_HAVE_FCNTL
#cmakedefine ICE_HAVE_NETINET
#cmakedefine ICE_HAVE_MMAN
#endif /* __ICE_CONFIG */
/*******************************************************************/
/* XDMF */
/* eXtensible Data Model and Format */
/* */
/* Id : Id */
/* Date : $Date$ */
/* Version : $Revision$ */
/* */
/* Author: */
/* Jerry A. Clarke */
/* clarke@arl.army.mil */
/* US Army Research Laboratory */
/* Aberdeen Proving Ground, MD */
/* */
/* Copyright @ 2002 US Army Research Laboratory */
/* All Rights Reserved */
/* See Copyright.txt or http://www.arl.hpc.mil/ice for details */
/* */
/* This software is distributed WITHOUT ANY WARRANTY; without */
/* even the implied warranty of MERCHANTABILITY or FITNESS */
/* FOR A PARTICULAR PURPOSE. See the above copyright notice */
/* for more information. */
/* */
/*******************************************************************/
#ifndef ice_included
#define ice_included
#if !defined( WIN32 ) || defined(__CYGWIN__)
#define UNIX
#endif /* WIN32 */
#ifndef SWIG
/* System Includes */
# include "stdio.h"
# include "stdlib.h"
# include "sys/types.h"
# include "time.h"
# include "string.h"
# ifdef __hpux
# include <sys/param.h>
# endif
# ifdef UNIX
# include "sys/file.h"
# include "strings.h"
# define STRCASECMP strcasecmp
# define STRNCASECMP strncasecmp
# define STRCMP strcmp
# define STRNCMP strncmp
# endif
# if defined(WIN32) && !defined(__CYGWIN__)
# include "winsock.h"
/* String comparison routine. */
# define STRCASECMP _stricmp
# define STRNCASECMP _strnicmp
# define STRCMP strcmp
# define STRNCMP strncmp
# endif
#endif
/* System Dependent Defines */
#include "IceConfig.h"
#ifndef ICE_SYSTEM
/* Force An Error */
ATTENTION ERROR_IN_ICE Probably a Bad/Missing IceConfig.h
#endif
#define ICE_MACHINE_TYPE ICE_SYSTEM
#ifndef SWIG
# ifdef ICE_HAVE_FCNTL
# include "fcntl.h"
# endif
# ifdef ICE_HAVE_MMAN
# include "sys/mman.h"
# else
# define ICE_HAS_NO_MMAP 1
# endif
# ifdef ICE_HAVE_NETINET
# include "netinet/in.h"
# endif
#endif
/* Defines */
#define ICE_INT ICE_32_INT
#define ICE_TRUE 1
#define ICE_FALSE 0
#define ICE_SUCCESS 1
#define ICE_FAIL -1
#define ICE_CHAR_TYPE 1
#define ICE_8_INT_TYPE 2
#define ICE_32_INT_TYPE 3
#define ICE_64_INT_TYPE 4
#define ICE_FLOAT_TYPE 5
#define ICE_DOUBLE_TYPE 6
/* Macros */
#define WORD2FLOAT( a ) ((a) == NULL ? ICE_FAIL : atof((a)))
#define WORD2INT( a ) ((a) == NULL ? ICE_FAIL : strtol( (a) , ( char **)NULL, 0))
#ifndef MAX
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef abs
#define ABS(a) ((a) >= 0 ? (a) : -(a))
#endif
#define ICE_ERROR fprintf(stderr, "Error on line #%d in file %s\n", __LINE__, __FILE__);
#define ICE_PERROR fprintf(stderr, "Error on line #%d in file %s\n", __LINE__, __FILE__);
#define ICE_PORT(a) (((a) * 5) + 7788 + 1)
#ifdef ICE_BYTE_ORDER_LITTLE
#define ICE_BYTE_ORDER_LITTLE
#endif
#ifdef ICE_BYTE_ORDER_LITTLE
#define ICE_x86_BYTEORDER
#else
#define ICE_XDR_BYTEORDER
#endif
/************************************************/
/************************************************/
/* Byte Order Macros */
/************************************************/
/************************************************/
#ifdef ICE_have_64_bit_int
typedef ICE_64_INT ICE_BIG_INT; /* Biggest Int */
#define ICE_x86_SHIFT64(a) \
( ICE_64_INT )( (( ( ICE_64_INT )(a) & 0xFFU ) << 56 ) | \
(( ( ICE_64_INT )(a) & 0xFF00U ) << 40 ) | \
(( ( ICE_64_INT )(a) & 0xFF0000U ) << 24 ) | \
(( ( ICE_64_INT )(a) & 0xFF000000U ) << 8 ) | \
(( ( ICE_64_INT )(a) >> 8 ) & 0xFF000000U ) | \
(( ( ICE_64_INT )(a) >> 24 ) & 0xFF0000U ) | \
(( ( ICE_64_INT )(a) >> 40 ) & 0xFF00U ) | \
(( ( ICE_64_INT )(a) >> 56 ) & 0xFFU ) )
#define ICE_XDR_SHIFT64(a) (a) /* Already in Correct Order */
#else /* have_64_bit_int */
#define ICE_x86_SHIFT64(a) (a)
#define ICE_XDR_SHIFT64(a) (a)
typedef ICE_32_INT ICE_BIG_INT;
#endif /* have_64_bit_int */
#define ICE_x86_SHIFT32(a) htonl((a))
#define ICE_XDR_SHIFT32(a) (a)
#ifdef ICE_x86_BYTEORDER
#define ICE_SHIFT64(a) ICE_x86_SHIFT64((a))
#define ICE_SHIFT32(a) ICE_x86_SHIFT32((a))
#endif
#ifdef ICE_XDR_BYTEORDER
#define ICE_SHIFT32(a) (a)
#define ICE_SHIFT64(a) (a)
#endif
#define ICE_SHIFT(a) (sizeof((a)) == 8 ? ICE_SHIFT64(a) : ICE_SHIFT32(a))
#define ICE_SHIFT_FROM32(a) ICE_SHIFT(a)
#define ICE_SHIFT_TO_XDR32(a) ICE_SHIFT(a)
#define ICE_SHIFT_FROM_XDR64(a) ICE_SHIFT(a)
#define ICE_SHIFT_TO_XDR64(a) ICE_SHIFT(a)
#define ICE_SHIFT_FROM_XDR(a) ICE_SHIFT(a)
#define ICE_SHIFT_TO_XDR(a) ICE_SHIFT(a)
#endif /* ice_included */
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