diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2011-02-22 19:37:06 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2011-02-22 19:37:06 (GMT) |
commit | 727b687ae6c80c9854cb53814fa1c12f27c2994c (patch) | |
tree | fabe359aaddbe3b4d1e2bb58ceb3b94311d66a1c /tools/misc/CMakeLists.txt | |
parent | 25486d50895fa4a30809d289b9aff4de583a9b84 (diff) | |
download | hdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.zip hdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.tar.gz hdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.tar.bz2 |
[svn-r20146] Description:
Bring r19714:20145 from trunk to revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.6 (amazon) in debug mode
Mac OS X/32 10.6.6 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'tools/misc/CMakeLists.txt')
-rw-r--r-- | tools/misc/CMakeLists.txt | 57 |
1 files changed, 43 insertions, 14 deletions
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 77962ec..6694458 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -12,18 +12,15 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test) # -------------------------------------------------------------------- #-- Misc Executables ADD_EXECUTABLE (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c) -H5_NAMING (h5debug) -TARGET_WIN_PROPERTIES (h5debug) +H5_NAMING (h5debug ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_EXECUTABLE (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c) -H5_NAMING (h5repart) -TARGET_WIN_PROPERTIES (h5repart) +H5_NAMING (h5repart ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_EXECUTABLE (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c) -H5_NAMING (h5mkgrp) -TARGET_WIN_PROPERTIES (h5mkgrp) +H5_NAMING (h5mkgrp ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET (H5_DEP_EXECUTABLES @@ -44,15 +41,13 @@ IF (BUILD_TESTING) # -------------------------------------------------------------------- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) ADD_EXECUTABLE (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c) - H5_NAMING (h5repart_gentest) - TARGET_WIN_PROPERTIES (h5repart_gentest) + H5_NAMING (h5repart_gentest ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) #ADD_TEST (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>) ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) ADD_EXECUTABLE (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c) - H5_NAMING (h5repart_test) - TARGET_WIN_PROPERTIES (h5repart_test) + H5_NAMING (h5repart_test ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) # -------------------------------------------------------------------- @@ -91,8 +86,8 @@ IF (BUILD_TESTING) ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) SET (HDF5_MKGRP_TEST_FILES - h5mkgrp_help - h5mkgrp_version + #h5mkgrp_help + #h5mkgrp_version h5mkgrp_single h5mkgrp_single_latest h5mkgrp_several @@ -115,6 +110,14 @@ IF (BUILD_TESTING) ) ENDFOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES}) + ADD_CUSTOM_COMMAND ( + TARGET h5mkgrp + POST_BUILD + COMMAND ${XLATE_UTILITY} + ARGS ${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt ${PROJECT_BINARY_DIR}/h5mkgrp_help.txt -l0 + ) + CONFIGURE_FILE (${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/h5mkgrp_version.txt @ONLY) + ############################################################################## ############################################################################## ### T H E T E S T S M A C R O S ### @@ -141,6 +144,7 @@ IF (BUILD_TESTING) COMMAND $<TARGET_FILE:h5mkgrp> ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 ${ARGN} ) ENDIF (NOT ${resultoption} STREQUAL " ") + SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}${resultoption} PROPERTIES DEPENDS H5MKGRP-clear-${resultfile}${resultoption}) ADD_TEST ( NAME H5MKGRP-H5LS-${resultfile}${resultoption} COMMAND "${CMAKE_COMMAND}" @@ -153,8 +157,23 @@ IF (BUILD_TESTING) -D "TEST_REFERENCE=${resultfile}.ls" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) + SET_TESTS_PROPERTIES (H5MKGRP-H5LS-${resultfile}${resultoption} PROPERTIES DEPENDS H5MKGRP-${resultfile}${resultoption}) ENDMACRO (ADD_H5_TEST resultfile resultcode resultoption) + MACRO (ADD_H5_CMP resultfile resultcode) + ADD_TEST ( + NAME H5MKGRP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp>" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.txt" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + ENDMACRO (ADD_H5_CMP resultfile resultcode) + ############################################################################## ############################################################################## ### T H E T E S T S ### @@ -170,6 +189,7 @@ IF (BUILD_TESTING) ) # 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) + SET_TESTS_PROPERTIES (h5repart_20K PROPERTIES DEPENDS h5repart_20K-clear-objects) # Remove any output file left over from previous test run ADD_TEST ( @@ -183,6 +203,7 @@ IF (BUILD_TESTING) ) # repartition family member size to 5 KB. ADD_TEST (NAME h5repart_5K COMMAND $<TARGET_FILE:h5repart> -m 5k family_file%05d.h5 scd_family%05d.h5) + SET_TESTS_PROPERTIES (h5repart_5K PROPERTIES DEPENDS h5repart_5K-clear-objects) # Remove any output file left over from previous test run ADD_TEST ( @@ -193,17 +214,25 @@ IF (BUILD_TESTING) ) # convert family file to sec2 file of 20,000 bytes ADD_TEST (NAME h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5) + SET_TESTS_PROPERTIES (h5repart_sec2 PROPERTIES DEPENDS h5repart_sec2-clear-objects) # test the output files repartitioned above. ADD_TEST (NAME h5repart_test COMMAND $<TARGET_FILE:h5repart_test>) + SET_TESTS_PROPERTIES (h5repart_test PROPERTIES DEPENDS h5repart_sec2 h5repart_5K h5repart_20K) SET (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5repart_test ) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5MKGRP-help COMMAND h5mkgrp -h) + ADD_TEST (NAME H5MKGRP-version COMMAND h5mkgrp -V) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + # Check that help & version is displayed properly - ADD_H5_TEST (h5mkgrp_help 1 "-h") - ADD_H5_TEST (h5mkgrp_version 1 "-V") + ADD_H5_CMP (h5mkgrp_help 0 "-h") + ADD_H5_CMP (h5mkgrp_version 0 "-V") # Create single group at root level ADD_H5_TEST (h5mkgrp_single 0 " " single) |