summaryrefslogtreecommitdiffstats
path: root/hl/test
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 /hl/test
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 'hl/test')
-rw-r--r--hl/test/CMakeLists.txt20
-rw-r--r--hl/test/CMakeTests.cmake20
2 files changed, 20 insertions, 20 deletions
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index f969dbf..2853438 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -11,7 +11,7 @@ PROJECT (HDF5_HL_TEST)
#-----------------------------------------------------------------------------
# Generate the H5srcdir_str.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
-SET (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
CONFIGURE_FILE (${HDF5_HL_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
@@ -21,15 +21,15 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
# Macro used to add a unit test
# --------------------------------------------------------------------
MACRO (HL_ADD_EXE hl_name)
- ADD_EXECUTABLE (hl_${hl_name} ${hl_name}.c)
+ add_executable (hl_${hl_name} ${hl_name}.c)
TARGET_NAMING (hl_${hl_name} ${LIB_TYPE})
TARGET_C_PROPERTIES (hl_${hl_name} " " " ")
- TARGET_LINK_LIBRARIES (hl_${hl_name}
+ target_link_libraries (hl_${hl_name}
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
)
- SET_TARGET_PROPERTIES (hl_${hl_name} PROPERTIES FOLDER test/hl)
+ set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl)
ENDMACRO (HL_ADD_EXE)
HL_ADD_EXE (test_ds)
@@ -43,16 +43,16 @@ HL_ADD_EXE (test_table)
# This executable is used to generate test files for the test_ds test.
# It should only be run during development when new test files are needed
# --------------------------------------------------------------------
-IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (hl_gen_test_ds gen_test_ds.c)
+if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ add_executable (hl_gen_test_ds gen_test_ds.c)
TARGET_NAMING (hl_gen_test_ds ${LIB_TYPE})
TARGET_C_PROPERTIES (hl_gen_test_ds " " " ")
- TARGET_LINK_LIBRARIES (hl_gen_test_ds
+ target_link_libraries (hl_gen_test_ds
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
)
- SET_TARGET_PROPERTIES (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen)
-ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen)
+endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake
index 5d42b57..ebbc353 100644
--- a/hl/test/CMakeTests.cmake
+++ b/hl/test/CMakeTests.cmake
@@ -10,24 +10,24 @@
# --------------------------------------------------------------------
MACRO (HL_ADD_TEST hl_name files)
ADD_TEST (NAME hl_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (hl_${hl_name} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ endif (NOT "${last_test}" STREQUAL "")
# --------------------------------------------------------------------
#-- Copy the necessary files.
# --------------------------------------------------------------------
- FOREACH (h5_file ${files})
- SET (dest "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying HL Test File ${h5_file} to ${dest}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_file ${files})
+ set (dest "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}")
+ #message (STATUS " Copying HL Test File ${h5_file} to ${dest}")
+ add_custom_command (
TARGET hl_${hl_name}
PRE_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_HL_TEST_SOURCE_DIR}/${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${HL_REFERENCE_TEST_FILES})
+ endforeach (h5_file ${HL_REFERENCE_TEST_FILES})
ENDMACRO (HL_ADD_TEST)
# Remove any output file left over from previous test run
@@ -60,10 +60,10 @@ ADD_TEST (
test_packet_table.h5
test_table.h5
)
-IF (NOT "${last_test}" STREQUAL "")
+if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (hl_test-clear-objects PROPERTIES DEPENDS ${last_test})
-ENDIF (NOT "${last_test}" STREQUAL "")
-SET (last_test "hl_test-clear-objects")
+endif (NOT "${last_test}" STREQUAL "")
+set (last_test "hl_test-clear-objects")
HL_ADD_TEST (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5")
HL_ADD_TEST (test_dset_opt "")