summaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-08-25 22:35:26 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-08-25 22:35:26 (GMT)
commit6cea4f52ce08eff0efb70201667dc84da4fbd457 (patch)
tree76dbadf088721b791331a3b4d3c7dcd4ffc58aaa /tools/misc
parentddcae21908080ffbd40fcd5ce3244df5f391e02d (diff)
downloadhdf5-6cea4f52ce08eff0efb70201667dc84da4fbd457.zip
hdf5-6cea4f52ce08eff0efb70201667dc84da4fbd457.tar.gz
hdf5-6cea4f52ce08eff0efb70201667dc84da4fbd457.tar.bz2
[svn-r19301] BZ 1958: Add h5dump xml tests to CMake support
Bring r19300 from trunk 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
#-----------------------------------------------------------------------------