summaryrefslogtreecommitdiffstats
path: root/c++/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 /c++/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 'c++/test')
-rw-r--r--c++/test/CMakeLists.txt14
-rw-r--r--c++/test/CMakeTests.cmake20
2 files changed, 17 insertions, 17 deletions
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index e498fc5..01a0179 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -11,7 +11,7 @@ PROJECT (HDF5_CPP_TEST)
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-SET (CPP_TEST_SRCS
+set (CPP_TEST_SRCS
${HDF5_CPP_TEST_SOURCE_DIR}/testhdf5.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tattr.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tcompound.cpp
@@ -29,27 +29,27 @@ SET (CPP_TEST_SRCS
#-----------------------------------------------------------------------------
# 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_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR} )
-ADD_EXECUTABLE (cpp_testhdf5 ${CPP_TEST_SRCS} )
+add_executable (cpp_testhdf5 ${CPP_TEST_SRCS} )
TARGET_NAMING (cpp_testhdf5 ${LIB_TYPE})
TARGET_C_PROPERTIES (cpp_testhdf5 " " " ")
-TARGET_LINK_LIBRARIES (cpp_testhdf5
+target_link_libraries (cpp_testhdf5
${HDF5_CPP_LIB_TARGET}
${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
)
-SET_TARGET_PROPERTIES (cpp_testhdf5 PROPERTIES FOLDER test/cpp)
+set_target_properties (cpp_testhdf5 PROPERTIES FOLDER test/cpp)
-ADD_CUSTOM_COMMAND (
+add_custom_command (
TARGET cpp_testhdf5
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_CPP_TEST_SOURCE_DIR}/th5s.h5 ${PROJECT_BINARY_DIR}/th5s.h5
)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake
index 3e4f6d9..ac1f111 100644
--- a/c++/test/CMakeTests.cmake
+++ b/c++/test/CMakeTests.cmake
@@ -20,9 +20,9 @@ ADD_TEST (
ADD_TEST (NAME cpp_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
SET_TESTS_PROPERTIES (cpp_testhdf5 PROPERTIES DEPENDS cpp_testhdf5-clear-objects)
-IF (HDF5_TEST_VFD)
+if (HDF5_TEST_VFD)
- SET (VFD_LIST
+ set (VFD_LIST
sec2
stdio
core
@@ -31,12 +31,12 @@ IF (HDF5_TEST_VFD)
family
)
- IF (DIRECT_VFD)
- SET (VFD_LIST ${VFD_LIST} direct)
- ENDIF (DIRECT_VFD)
+ if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+ endif (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME VFD-${vfdname}-cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -60,12 +60,12 @@ IF (HDF5_TEST_VFD)
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
SET_TESTS_PROPERTIES (VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS VFD-${vfdname}-cpp_testhdf5-clear-objects)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)
# Run test with different Virtual File Driver
- FOREACH (vfd ${VFD_LIST})
+ foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
- ENDFOREACH (vfd ${VFD_LIST})
+ endforeach (vfd ${VFD_LIST})
-ENDIF (HDF5_TEST_VFD)
+endif (HDF5_TEST_VFD)