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/h5ls | |
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/h5ls')
-rw-r--r-- | tools/h5ls/CMakeLists.txt | 16 | ||||
-rw-r--r-- | tools/h5ls/CMakeTests.cmake | 56 |
2 files changed, 36 insertions, 36 deletions
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index eeaf1ea..b351268 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -9,21 +9,21 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) #----------------------------------------------------------------------------- # Add the h5ls executable #----------------------------------------------------------------------------- -ADD_EXECUTABLE (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c) +add_executable (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c) TARGET_NAMING (h5ls ${LIB_TYPE}) TARGET_C_PROPERTIES (h5ls " " " ") -TARGET_LINK_LIBRARIES (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) -SET_TARGET_PROPERTIES (h5ls PROPERTIES FOLDER tools) +target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +set_target_properties (h5ls PROPERTIES FOLDER tools) -SET (H5_DEP_EXECUTABLES +set (H5_DEP_EXECUTABLES h5ls ) -IF (BUILD_TESTING) +if (BUILD_TESTING) - INCLUDE (CMakeTests.cmake) + include (CMakeTests.cmake) -ENDIF (BUILD_TESTING) +endif (BUILD_TESTING) ############################################################################## ############################################################################## @@ -37,7 +37,7 @@ ENDIF (BUILD_TESTING) #INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR} toolsapplications) -INSTALL ( +install ( TARGETS h5ls RUNTIME DESTINATION diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake index 09f375d..b2d039f 100644 --- a/tools/h5ls/CMakeTests.cmake +++ b/tools/h5ls/CMakeTests.cmake @@ -8,7 +8,7 @@ # -------------------------------------------------------------------- # Copy all the test files from source directory to test directory # -------------------------------------------------------------------- - SET (LIST_HDF5_TEST_FILES + set (LIST_HDF5_TEST_FILES ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5 @@ -33,7 +33,7 @@ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5 ) - SET (LIST_OTHER_TEST_FILES + set (LIST_OTHER_TEST_FILES ${HDF5_TOOLS_SRC_DIR}/testfiles/help-1.ls ${HDF5_TOOLS_SRC_DIR}/testfiles/help-2.ls ${HDF5_TOOLS_SRC_DIR}/testfiles/help-3.ls @@ -95,17 +95,17 @@ FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") # copy the list of test files - FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) GET_FILENAME_COMPONENT(fname "${listfiles}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") - #MESSAGE (STATUS " Copying ${listfiles} to ${dest}") - ADD_CUSTOM_COMMAND ( + set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") + #message (STATUS " Copying ${listfiles} to ${dest}") + add_custom_command ( TARGET h5ls POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${listfiles} ${dest} ) - ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) ############################################################################## @@ -116,16 +116,16 @@ MACRO (ADD_H5_TEST resultfile resultcode) # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) + if (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN}) SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - IF (${resultcode} STREQUAL "1") + if (${resultcode} STREQUAL "1") SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (${resultcode} STREQUAL "1") - IF (NOT "${last_test}" STREQUAL "") + endif (${resultcode} STREQUAL "1") + if (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) + endif (NOT "${last_test}" STREQUAL "") + else (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( NAME H5LS-${resultfile}-clear-objects COMMAND ${CMAKE_COMMAND} @@ -143,7 +143,7 @@ -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-${resultfile}-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + endif (HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (ADD_H5_TEST file) ############################################################################## @@ -152,7 +152,7 @@ ############################################################################## ############################################################################## - IF (HDF5_ENABLE_USING_MEMCHECKER) + if (HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run ADD_TEST ( NAME H5LS-clearall-objects @@ -265,11 +265,11 @@ tvldtypes2be.out tvldtypes2be.out.err ) - IF (NOT "${last_test}" STREQUAL "") + if (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5LS-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5LS-clearall-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + endif (NOT "${last_test}" STREQUAL "") + set (last_test "H5LS-clearall-objects") + endif (HDF5_ENABLE_USING_MEMCHECKER) # test the help syntax ADD_H5_TEST (help-1 0 -w80 -h) @@ -378,25 +378,25 @@ # test for attribute with region references wo verbose mode # ( HDFFV-7838, ) - IF (H5_WORDS_BIGENDIAN) + if (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tattrreg_be 0 -w80 -v -d tattrreg.h5) - ELSE (H5_WORDS_BIGENDIAN) + else (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tattrreg_le 0 -w80 -v -d tattrreg.h5) - ENDIF (H5_WORDS_BIGENDIAN) + endif (H5_WORDS_BIGENDIAN) # test for non-existing file ADD_H5_TEST (nosuchfile 1 nosuchfile.h5) # test for variable length data types in verbose mode - IF (H5_WORDS_BIGENDIAN) + if (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tvldtypes2be 0 -v tvldtypes1.h5) - ELSE (H5_WORDS_BIGENDIAN) + else (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tvldtypes2le 0 -v tvldtypes1.h5) - ENDIF (H5_WORDS_BIGENDIAN) + endif (H5_WORDS_BIGENDIAN) # test for dataset region references data types in verbose mode - IF (H5_WORDS_BIGENDIAN) + if (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5) - ELSE (H5_WORDS_BIGENDIAN) + else (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tdataregle 0 -v tdatareg.h5) - ENDIF (H5_WORDS_BIGENDIAN) + endif (H5_WORDS_BIGENDIAN) |