summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2016-08-01 17:35:00 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2016-08-01 17:35:00 (GMT)
commite55844b7523676c381eb22f638369a794021d798 (patch)
tree9121dc5ee07215bc6389dc8bcf61e96b4040e69f /c++
parent1494413413932f1e640815d109fd1e8386bab3f9 (diff)
downloadhdf5-e55844b7523676c381eb22f638369a794021d798.zip
hdf5-e55844b7523676c381eb22f638369a794021d798.tar.gz
hdf5-e55844b7523676c381eb22f638369a794021d798.tar.bz2
[svn-r30237] HDFFV-9939: Change cmake commands to reduce POST_BUILD custom commands. Fixes possible overruns on windows command lines.
Diffstat (limited to 'c++')
-rw-r--r--c++/test/CMakeLists.txt7
-rw-r--r--c++/test/CMakeTests.cmake12
2 files changed, 7 insertions, 12 deletions
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index dffe7a4..9d98d11 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -48,11 +48,4 @@ set_target_properties (cpp_testhdf5 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
-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)
diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake
index c725f69..4a4601a 100644
--- a/c++/test/CMakeTests.cmake
+++ b/c++/test/CMakeTests.cmake
@@ -1,3 +1,5 @@
+HDFTEST_COPY_FILE("${HDF5_CPP_TEST_SOURCE_DIR}/th5s.h5" "${PROJECT_BINARY_DIR}/th5s.h5" "cpp_testhdf5_files")
+add_custom_target(cpp_testhdf5_files ALL COMMENT "Copying files needed by cpp_testhdf5 tests" DEPENDS ${cpp_testhdf5_files_list})
##############################################################################
##############################################################################
@@ -8,7 +10,7 @@
add_test (
NAME CPP_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
tattr_basic.h5
tattr_compound.h5
tattr_dtype.h5
@@ -30,7 +32,7 @@ if (HDF5_TEST_VFD)
multi
family
)
-
+
if (DIRECT_VFD)
set (VFD_LIST ${VFD_LIST} direct)
endif (DIRECT_VFD)
@@ -40,7 +42,7 @@ if (HDF5_TEST_VFD)
add_test (
NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
tattr_basic.h5
tattr_compound.h5
tattr_dtype.h5
@@ -49,7 +51,7 @@ if (HDF5_TEST_VFD)
tfattrs.h5
)
add_test (
- NAME CPP_VFD-${vfdname}-cpp_testhdf5
+ NAME CPP_VFD-${vfdname}-cpp_testhdf5
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
-D "TEST_ARGS:STRING="
@@ -63,7 +65,7 @@ if (HDF5_TEST_VFD)
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT 30)
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)
-
+
# Run test with different Virtual File Driver
foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)