summaryrefslogtreecommitdiffstats
path: root/tools/h5stat
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2014-03-11 21:14:57 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2014-03-11 21:14:57 (GMT)
commita3292a77cef4fc760aab8b496cd6b105c5370890 (patch)
tree188bd8e5268775213f516dc7062ead790a9997b1 /tools/h5stat
parent5b7c8c7a7d0b40e36a744f7e1dc68cd189e321b2 (diff)
downloadhdf5-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/h5stat')
-rw-r--r--tools/h5stat/CMakeLists.txt26
-rw-r--r--tools/h5stat/CMakeTests.cmake48
2 files changed, 37 insertions, 37 deletions
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index 6086fc2..a97be07 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -9,30 +9,30 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5stat executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c)
+add_executable (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c)
TARGET_NAMING (h5stat ${LIB_TYPE})
TARGET_C_PROPERTIES (h5stat " " " ")
-TARGET_LINK_LIBRARIES (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5stat PROPERTIES FOLDER tools)
+target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5stat PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5stat)
+set (H5_DEP_EXECUTABLES h5stat)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5stat test executables
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5stat_gentest ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat_gentest.c)
+ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ add_executable (h5stat_gentest ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat_gentest.c)
TARGET_NAMING (h5stat_gentest ${LIB_TYPE})
TARGET_C_PROPERTIES (h5stat_gentest " " " ")
- TARGET_LINK_LIBRARIES (h5stat_gentest ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5stat_gentest PROPERTIES FOLDER generator/tools)
+ target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET})
+ set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools)
#ADD_TEST (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -46,7 +46,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5stat ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5stat
RUNTIME DESTINATION
diff --git a/tools/h5stat/CMakeTests.cmake b/tools/h5stat/CMakeTests.cmake
index 81ddf82..4ae9ff7 100644
--- a/tools/h5stat/CMakeTests.cmake
+++ b/tools/h5stat/CMakeTests.cmake
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
- SET (HDF5_REFERENCE_FILES
+ set (HDF5_REFERENCE_FILES
h5stat_help1.ddl
h5stat_help2.ddl
h5stat_notexist.ddl
@@ -41,34 +41,34 @@
h5stat_numattrs3.ddl
h5stat_numattrs4.ddl
)
- SET (HDF5_REFERENCE_TEST_FILES
+ set (HDF5_REFERENCE_TEST_FILES
h5stat_filters.h5
h5stat_tsohm.h5
h5stat_newgrat.h5
h5stat_threshold.h5
)
- FOREACH (ddl_file ${HDF5_REFERENCE_FILES})
- SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}")
- #MESSAGE (STATUS " Translating ${ddl_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (ddl_file ${HDF5_REFERENCE_FILES})
+ set (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}")
+ #message (STATUS " Translating ${ddl_file}")
+ add_custom_command (
TARGET h5stat
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest}
)
- ENDFOREACH (ddl_file ${HDF5_REFERENCE_FILES})
+ endforeach (ddl_file ${HDF5_REFERENCE_FILES})
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/${h5_file}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET h5stat
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
##############################################################################
##############################################################################
@@ -78,15 +78,15 @@
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 H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
- IF (NOT ${resultcode} STREQUAL "0")
+ if (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5STAT-${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 H5STAT-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -104,7 +104,7 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST file)
##############################################################################
@@ -113,7 +113,7 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5STAT-clearall-objects
@@ -182,11 +182,11 @@
h5stat_numattrs4.out
h5stat_numattrs4.out.err
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5STAT-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5STAT-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# Test for help flag
ADD_H5_TEST (h5stat_help1 0 -h)