summaryrefslogtreecommitdiffstats
path: root/tools/test/h5copy/CMakeLists.txt
blob: 4a519ab916436fe6397ed02eaf26dcafc3abc88f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cmake_minimum_required (VERSION 3.2.2)
PROJECT (HDF5_TOOLS_TEST_H5COPY)

#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)

# --------------------------------------------------------------------
# Add the h5copy test executables
# --------------------------------------------------------------------

  if (HDF5_BUILD_GENERATORS)
    add_executable (h5copygentest ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/h5copygentest.c)
    TARGET_NAMING (h5copygentest STATIC)
    TARGET_C_PROPERTIES (h5copygentest STATIC " " " ")
    target_link_libraries (h5copygentest ${HDF5_LIB_TARGET})
    set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools)

    #add_test (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>)
  endif ()

  include (CMakeTests.cmake)
79'>79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the COPYING file, which can be found at the root of the source code       *
 * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.  *
 * If you do not have access to either file, you may request a copy from     *
 * help@hdfgroup.org.                                                        *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/*
 * This file contains private information about the H5T module
 */
#ifndef _H5Tprivate_H
#define _H5Tprivate_H

/* Early typedefs to avoid circular dependencies */
typedef struct H5T_t H5T_t;

/* Get package's public header */
#include "H5Tpublic.h"

/* Other public headers needed by this file */
#include "H5MMpublic.h"         /* Memory management                    */

/* Private headers needed by this file */
#include "H5private.h"		/* Generic Functions			*/
#include "H5Gprivate.h"		/* Groups 			  	*/
#include "H5Rprivate.h"		/* References				*/

/* Macro for size of temporary buffers to contain a single element */
#define H5T_ELEM_BUF_SIZE       256

/* If the module using this macro is allowed access to the private variables, access them directly */
#ifdef H5T_MODULE
#define H5T_GET_SIZE(T)                 ((T)->shared->size)
#define H5T_GET_SHARED(T)               ((T)->shared)
#define H5T_GET_MEMBER_OFFSET(T, I)     ((T)->u.compnd.memb[I].offset)
#define H5T_GET_MEMBER_SIZE(T, I)       ((T)->u.compnd.memb[I].shared->size)
#else /* H5T_MODULE */
#define H5T_GET_SIZE(T)                 (H5T_get_size(T))
#define H5T_GET_SHARED(T)               (H5T_get_shared(T))
#define H5T_GET_MEMBER_OFFSET(T, I)     (H5T_get_member_offset((T), (I)))
#define H5T_GET_MEMBER_SIZE(T, I)       (H5T_get_member_size((T), (I)))
#endif /* H5T_MODULE */

/* Forward references of package typedefs (declared in H5Tpkg.h) */
typedef struct H5T_stats_t H5T_stats_t;
typedef struct H5T_path_t H5T_path_t;

/* How to copy a datatype */
typedef enum H5T_copy_t {
    H5T_COPY_TRANSIENT,
    H5T_COPY_ALL,
    H5T_COPY_REOPEN
} H5T_copy_t;

/* Location of datatype information */
typedef enum {
    H5T_LOC_BADLOC =   0,  /* invalid datatype location */
    H5T_LOC_MEMORY,        /* data stored in memory */
    H5T_LOC_DISK,          /* data stored on disk */
    H5T_LOC_MAXLOC         /* highest value (Invalid as true value) */
} H5T_loc_t;

/* VL allocation information */
typedef struct {
    H5MM_allocate_t alloc_func; /* Allocation function */
    void *alloc_info;           /* Allocation information */
    H5MM_free_t free_func;      /* Free function */
    void *free_info;            /* Free information */
} H5T_vlen_alloc_info_t;

/* Structure for conversion callback property */
typedef struct H5T_conv_cb_t {
    H5T_conv_except_func_t      func;
    void*                       user_data;
} H5T_conv_cb_t;

/* Values for the optimization of compound data reading and writing.  They indicate
 * whether the fields of the source and destination are subset of each other and
 * there is no conversion needed.
 */
typedef enum {
    H5T_SUBSET_BADVALUE = -1,   /* Invalid value */
    H5T_SUBSET_FALSE = 0,       /* Source and destination aren't subset of each other */
    H5T_SUBSET_SRC,             /* Source is the subset of dest and no conversion is needed */
    H5T_SUBSET_DST,             /* Dest is the subset of source and no conversion is needed */
    H5T_SUBSET_CAP              /* Must be the last value */
} H5T_subset_t;

typedef struct H5T_subset_info_t {
    H5T_subset_t    subset;     /* See above */
    size_t          copy_size;  /* Size in bytes, to copy for each element */
} H5T_subset_info_t;

/* Forward declarations for prototype arguments */
struct H5O_t;

/* The native endianess of the platform */
H5_DLLVAR H5T_order_t H5T_native_order_g;

/* Private functions */
H5_DLL herr_t H5T_init(void);