diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2014-03-11 21:14:57 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2014-03-11 21:14:57 (GMT) |
commit | a3292a77cef4fc760aab8b496cd6b105c5370890 (patch) | |
tree | 188bd8e5268775213f516dc7062ead790a9997b1 /tools/h5import | |
parent | 5b7c8c7a7d0b40e36a744f7e1dc68cd189e321b2 (diff) | |
download | hdf5-a3292a77cef4fc760aab8b496cd6b105c5370890.zip hdf5-a3292a77cef4fc760aab8b496cd6b105c5370890.tar.gz hdf5-a3292a77cef4fc760aab8b496cd6b105c5370890.tar.bz2 |
[svn-r24781] HDFFV-8700 -
KitWare recommendations: Change CMake commands to lower case.
Remove INCLUDE_DIRECTORIES in src for target level includes.
Change ADD_DEFINITIONS package debug defines into CMake option.
Remove -DNDEBUG
Diffstat (limited to 'tools/h5import')
-rw-r--r-- | tools/h5import/CMakeLists.txt | 24 | ||||
-rw-r--r-- | tools/h5import/CMakeTests.cmake | 90 |
2 files changed, 57 insertions, 57 deletions
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index 7caf44a..32dff55 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -9,28 +9,28 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # -------------------------------------------------------------------- # Add the h5import executables # -------------------------------------------------------------------- -ADD_EXECUTABLE (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c) +add_executable (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c) TARGET_NAMING (h5import ${LIB_TYPE}) TARGET_C_PROPERTIES (h5import " " " ") -TARGET_LINK_LIBRARIES (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -#SET_TARGET_PROPERTIES (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT) -SET_TARGET_PROPERTIES (h5import PROPERTIES FOLDER tools) +target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +#set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT) +set_target_properties (h5import PROPERTIES FOLDER tools) -SET (H5_DEP_EXECUTABLES h5import) +set (H5_DEP_EXECUTABLES h5import) -IF (BUILD_TESTING) +if (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5import executables # -------------------------------------------------------------------- - ADD_EXECUTABLE (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c) + add_executable (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c) TARGET_NAMING (h5importtest ${LIB_TYPE}) TARGET_C_PROPERTIES (h5importtest " " " ") - TARGET_LINK_LIBRARIES (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - SET_TARGET_PROPERTIES (h5importtest PROPERTIES FOLDER tools) + target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + set_target_properties (h5importtest PROPERTIES FOLDER tools) - INCLUDE (CMakeTests.cmake) + include (CMakeTests.cmake) -ENDIF (BUILD_TESTING) +endif (BUILD_TESTING) ############################################################################## ############################################################################## @@ -44,7 +44,7 @@ ENDIF (BUILD_TESTING) #INSTALL_PROGRAM_PDB (h5import ${HDF5_INSTALL_BIN_DIR} toolsapplications) -INSTALL ( +install ( TARGETS h5import RUNTIME DESTINATION diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake index 96cca87..3250910 100644 --- a/tools/h5import/CMakeTests.cmake +++ b/tools/h5import/CMakeTests.cmake @@ -5,7 +5,7 @@ ############################################################################## ############################################################################## - SET (HDF5_REFERENCE_CONF_FILES + set (HDF5_REFERENCE_CONF_FILES binfp64.conf binin8.conf binin8w.conf @@ -23,7 +23,7 @@ textpfe.conf txtstr.conf ) - SET (HDF5_REFERENCE_TXT_FILES + set (HDF5_REFERENCE_TXT_FILES txtfp32.txt txtfp64.txt txtuin16.txt @@ -42,7 +42,7 @@ dbinuin32.h5.txt dtxtstr.h5.txt ) - SET (HDF5_REFERENCE_TEST_FILES + set (HDF5_REFERENCE_TEST_FILES binfp64.h5 binin8.h5 binin8w.h5 @@ -62,38 +62,38 @@ ) FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - FOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}") - #MESSAGE (STATUS " Copying ${conf_file}") - ADD_CUSTOM_COMMAND ( + foreach (conf_file ${HDF5_REFERENCE_CONF_FILES}) + set (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}") + #message (STATUS " Copying ${conf_file}") + add_custom_command ( TARGET h5import POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file} ${dest} ) - ENDFOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES}) + endforeach (conf_file ${HDF5_REFERENCE_CONF_FILES}) - FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}") - #MESSAGE (STATUS " Copying ${txt_file}") - ADD_CUSTOM_COMMAND ( + foreach (txt_file ${HDF5_REFERENCE_TXT_FILES}) + set (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}") + #message (STATUS " Copying ${txt_file}") + add_custom_command ( TARGET h5import POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file} ${dest} ) - ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES}) + endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES}) - FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}") - #MESSAGE (STATUS " Copying ${h5_file}") - ADD_CUSTOM_COMMAND ( + foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) + set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}") + #message (STATUS " Copying ${h5_file}") + add_custom_command ( TARGET h5import POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file} ${dest} ) - ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) + endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES}) ############################################################################## ############################################################################## @@ -102,12 +102,12 @@ ############################################################################## MACRO (ADD_H5_TEST testname importfile conffile testfile) # If using memchecker skip macro based tests - IF (HDF5_ENABLE_USING_MEMCHECKER) + if (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile}) - IF (NOT "${last_test}" STREQUAL "") + if (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-h5importtest) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) + endif (NOT "${last_test}" STREQUAL "") + else (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( NAME H5IMPORT-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} @@ -149,12 +149,12 @@ -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + endif (HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (ADD_H5_TEST testname importfile conffile testfile) MACRO (ADD_H5_DUMPTEST testname datasetname testfile) # If using memchecker skip tests - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( NAME H5IMPORT-DUMP-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} @@ -170,7 +170,7 @@ ) SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest) - IF ("${ARGN}" STREQUAL "BINARY") + if ("${ARGN}" STREQUAL "BINARY") ADD_TEST ( NAME H5IMPORT-DUMP-${testname}-H5DMP COMMAND "${CMAKE_COMMAND}" @@ -182,7 +182,7 @@ -D "TEST_SKIP_COMPARE=TRUE" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) - ELSE ("${ARGN}" STREQUAL "BINARY") + else ("${ARGN}" STREQUAL "BINARY") ADD_TEST ( NAME H5IMPORT-DUMP-${testname}-H5DMP COMMAND "${CMAKE_COMMAND}" @@ -194,7 +194,7 @@ -D "TEST_SKIP_COMPARE=TRUE" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) - ENDIF ("${ARGN}" STREQUAL "BINARY") + endif ("${ARGN}" STREQUAL "BINARY") SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects") ADD_TEST ( @@ -223,24 +223,24 @@ -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}") - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + endif (NOT HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (ADD_H5_DUMPTEST testname datasetname testfile) MACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( NAME H5IMPORT-DUMP-${testname}-SKIPPED COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available" ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + endif (NOT HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile) # -------------------------------------------------------------------- # Determine if filter is available for h5diff # -------------------------------------------------------------------- - IF (H5_HAVE_FILTER_DEFLATE) - SET (USE_FILTER_DEFLATE "true") - ENDIF (H5_HAVE_FILTER_DEFLATE) + if (H5_HAVE_FILTER_DEFLATE) + set (USE_FILTER_DEFLATE "true") + endif (H5_HAVE_FILTER_DEFLATE) ############################################################################## ############################################################################## @@ -248,7 +248,7 @@ ############################################################################## ############################################################################## - IF (HDF5_ENABLE_USING_MEMCHECKER) + if (HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run ADD_TEST ( NAME H5IMPORT-clear-objects @@ -406,8 +406,8 @@ dtxtstr.h5.dff dtxtstr.h5.dff.err ) - SET (last_test "H5IMPORT-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + set (last_test "H5IMPORT-clear-objects") + endif (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( NAME H5IMPORT-h5importtest-clear-objects @@ -421,10 +421,10 @@ binuin16.bin binuin32.bin ) - IF (NOT "${last_test}" STREQUAL "") + if (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5IMPORT-h5importtest-clear-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5IMPORT-clear-objects") + endif (NOT "${last_test}" STREQUAL "") + set (last_test "H5IMPORT-clear-objects") ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>) SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS H5IMPORT-h5importtest-clear-objects) @@ -452,19 +452,19 @@ # ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " ADD_H5_TEST (BINARY_F64 binfp64.bin testfiles/binfp64.conf binfp64.h5) - IF (NOT USE_FILTER_DEFLATE) + if (NOT USE_FILTER_DEFLATE) ADD_H5_SKIP_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY) - ELSE (NOT USE_FILTER_DEFLATE) + else (NOT USE_FILTER_DEFLATE) ADD_H5_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY) - ENDIF (NOT USE_FILTER_DEFLATE) + endif (NOT USE_FILTER_DEFLATE) # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " ADD_H5_TEST (BINARY_I8 binin8.bin testfiles/binin8.conf binin8.h5) - IF (NOT USE_FILTER_DEFLATE) + if (NOT USE_FILTER_DEFLATE) ADD_H5_SKIP_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY) - ELSE (NOT USE_FILTER_DEFLATE) + else (NOT USE_FILTER_DEFLATE) ADD_H5_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY) - ENDIF (NOT USE_FILTER_DEFLATE) + endif (NOT USE_FILTER_DEFLATE) # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " ADD_H5_TEST (BINARY_I16 binin16.bin testfiles/binin16.conf binin16.h5) |