diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-11-23 03:57:28 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-11-23 03:57:28 (GMT) |
commit | 4d2eb986229d4fcf17bc2ef12802cfb43d2f0d06 (patch) | |
tree | b606744e58a42702abec7c0a28a15137132f311a /test | |
parent | 38bd287c8d20ee59040bc74ff7dd5ed5266569a9 (diff) | |
download | hdf5-4d2eb986229d4fcf17bc2ef12802cfb43d2f0d06.zip hdf5-4d2eb986229d4fcf17bc2ef12802cfb43d2f0d06.tar.gz hdf5-4d2eb986229d4fcf17bc2ef12802cfb43d2f0d06.tar.bz2 |
[svn-r28441] Updated CMake files to correctly handle the changes to the accum test.
Tested on Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
serial only
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c0dfd26..8651919 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -415,6 +415,41 @@ if (BUILD_SHARED_LIBS) set_target_properties (links_env-shared PROPERTIES FOLDER test) endif (BUILD_SHARED_LIBS) +#-- Adding test for accum_swmr_reader +# This has to be copied to the test directory for execve() to find it +# and it can't be renamed (i.e., no <foo>-shared). +add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c) +TARGET_NAMING (accum_swmr_reader STATIC) +TARGET_C_PROPERTIES (accum_swmr_reader STATIC " " " ") +target_link_libraries (accum_swmr_reader ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +set_target_properties (accum_swmr_reader PROPERTIES FOLDER test) +add_custom_command ( + TARGET accum_swmr_reader + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${CMAKE_BINARY_DIR}/bin/accum_swmr_reader" "${PROJECT_BINARY_DIR}/H5TEST/accum_swmr_reader" +) +if (BUILD_SHARED_LIBS) + add_executable (accum_swmr_reader-shared ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c) + TARGET_NAMING (accum_swmr_reader-shared SHARED) + TARGET_C_PROPERTIES (accum_swmr_reader-shared SHARED " " " ") + target_link_libraries (accum_swmr_reader-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (accum_swmr_reader-shared PROPERTIES FOLDER test) + # NOTE: Revert name to name without "-shared" on copy + add_custom_command ( + TARGET accum_swmr_reader-shared + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different "${CMAKE_BINARY_DIR}/bin/accum_swmr_reader-shared" "${PROJECT_BINARY_DIR}/H5TEST-shared/accum_swmr_reader" + ) +endif (BUILD_SHARED_LIBS) + +#-- Set accum dependencies +set_target_properties (accum PROPERTIES DEPENDS accum_swmr_reader) +if (BUILD_SHARED_LIBS) + set_target_properties (accum-shared PROPERTIES DEPENDS accum_swmr_reader-shared) +endif (BUILD_SHARED_LIBS) + #-- Adding test for libinfo set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) file (WRITE ${GREP_RUNNER} |