summaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-08-25 22:33:59 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-08-25 22:33:59 (GMT)
commit5c549a6345f12a0271b7a44e06169adb20c568c1 (patch)
tree1fb7a7d0b5eef9ae2c12483104af40dd3c47e2aa /tools/misc
parent52839cdf69f02c99a4a25f65ec9c21f698ad81a6 (diff)
downloadhdf5-5c549a6345f12a0271b7a44e06169adb20c568c1.zip
hdf5-5c549a6345f12a0271b7a44e06169adb20c568c1.tar.gz
hdf5-5c549a6345f12a0271b7a44e06169adb20c568c1.tar.bz2
[svn-r19300] BZ 1958: Add h5dump xml tests to CMake support
Tetsed: local linux
Diffstat (limited to 'tools/misc')
-rw-r--r--tools/misc/CMakeLists.txt86
1 files changed, 58 insertions, 28 deletions
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index 321d0f0..205f603 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -8,7 +8,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib)
INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
# --------------------------------------------------------------------
-# Add the misc and test executables
+# Add the misc executables
# --------------------------------------------------------------------
#-- Misc Executables
ADD_EXECUTABLE (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c)
@@ -59,7 +59,48 @@ SET (H5_DEP_EXECUTABLES
h5mkgrp
)
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
IF (BUILD_TESTING)
+ # --------------------------------------------------------------------
+ # Add the misc test executables
+ # --------------------------------------------------------------------
+ IF (NOT BUILD_SHARED_LIBS)
+ ADD_EXECUTABLE (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c)
+ H5_NAMING (h5repart_gentest)
+ IF (WIN32)
+ IF (MSVC)
+ SET_TARGET_PROPERTIES (h5repart_gentest
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
+ ENDIF (MSVC)
+ ENDIF (WIN32)
+ TARGET_LINK_LIBRARIES (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ #ADD_TEST (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>)
+ ENDIF (NOT BUILD_SHARED_LIBS)
+
+ ADD_EXECUTABLE (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c)
+ H5_NAMING (h5repart_test)
+ IF (WIN32)
+ IF (MSVC)
+ IF (NOT BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (h5repart_test
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
+ ENDIF (NOT BUILD_SHARED_LIBS)
+ ENDIF (MSVC)
+ ENDIF (WIN32)
+ TARGET_LINK_LIBRARIES (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+
+ # --------------------------------------------------------------------
+ # Copy all the HDF5 files from the test directory into the source directory
+ # --------------------------------------------------------------------
SET (HDF5_REFERENCE_TEST_FILES
family_file00000.h5
family_file00001.h5
@@ -92,34 +133,17 @@ IF (BUILD_TESTING)
)
ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- IF (NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c)
- H5_NAMING (h5repart_gentest)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (h5repart_gentest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
- TARGET_LINK_LIBRARIES (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
- #ADD_TEST (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>)
- ENDIF (NOT BUILD_SHARED_LIBS)
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
- ADD_EXECUTABLE (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c)
- H5_NAMING (h5repart_test)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5repart_test
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
- TARGET_LINK_LIBRARIES (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
# repartition family member size to 20,000 bytes.
ADD_TEST (NAME h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5)
@@ -137,6 +161,12 @@ IF (BUILD_TESTING)
)
ENDIF (BUILD_TESTING)
+##############################################################################
+##############################################################################
+### I N S T A L L A T I O N ###
+##############################################################################
+##############################################################################
+
#-----------------------------------------------------------------------------
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------