diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2014-03-26 15:00:35 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2014-03-26 15:00:35 (GMT) |
commit | d9020f2e35342605b26b6260e05cc4a2cef2327b (patch) | |
tree | 344bb1fde0fd8def1e2228abadc7e64b605e11dc /testpar | |
parent | 3944dcb308de2d380822d2d56cf0d3bd96db5c8f (diff) | |
download | hdf5-d9020f2e35342605b26b6260e05cc4a2cef2327b.zip hdf5-d9020f2e35342605b26b6260e05cc4a2cef2327b.tar.gz hdf5-d9020f2e35342605b26b6260e05cc4a2cef2327b.tar.bz2 |
[svn-r24906] Merge latest CMake changes from trunk.
Tested: local linux
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/CMakeLists.txt | 31 | ||||
-rw-r--r-- | testpar/CMakeTests.cmake | 36 |
2 files changed, 34 insertions, 33 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index a3ef96d..6d4f4d4 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -1,10 +1,10 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TEST_PAR) #----------------------------------------------------------------------------- # Apply Definitions to compiler in this directory and below #----------------------------------------------------------------------------- -ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS}) +add_definitions (${HDF5_EXTRA_C_FLAGS}) INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib ) @@ -12,7 +12,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib ) # Define Tests #----------------------------------------------------------------------------- -SET (testphdf5_SRCS +set (testphdf5_SRCS ${HDF5_TEST_PAR_SOURCE_DIR}/testphdf5.c ${HDF5_TEST_PAR_SOURCE_DIR}/t_dset.c ${HDF5_TEST_PAR_SOURCE_DIR}/t_file.c @@ -23,24 +23,25 @@ SET (testphdf5_SRCS ${HDF5_TEST_PAR_SOURCE_DIR}/t_span_tree.c ${HDF5_TEST_PAR_SOURCE_DIR}/t_chunk_alloc.c ${HDF5_TEST_PAR_SOURCE_DIR}/t_filter_read.c + ${HDF5_TEST_PAR_SOURCE_DIR}/t_prop.c ) #-- Adding test for testhdf5 -ADD_EXECUTABLE (testphdf5 ${testphdf5_SRCS}) +add_executable (testphdf5 ${testphdf5_SRCS}) TARGET_NAMING (testphdf5 ${LIB_TYPE}) TARGET_C_PROPERTIES (testphdf5 " " " ") -TARGET_LINK_LIBRARIES (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) -SET_TARGET_PROPERTIES (testphdf5 PROPERTIES FOLDER test/par) +target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) +set_target_properties (testphdf5 PROPERTIES FOLDER test/par) MACRO (ADD_H5P_EXE file) - ADD_EXECUTABLE (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) + add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) TARGET_NAMING (${file} ${LIB_TYPE}) TARGET_C_PROPERTIES (${file} " " " ") - TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) - SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test/par) + target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) + set_target_properties (${file} PROPERTIES FOLDER test/par) ENDMACRO (ADD_H5P_EXE file) -SET (H5P_TESTS +set (H5P_TESTS t_mpi # t_posix_compliant t_cache @@ -49,12 +50,12 @@ SET (H5P_TESTS t_shapesame ) -FOREACH (testp ${H5P_TESTS}) +foreach (testp ${H5P_TESTS}) ADD_H5P_EXE(${testp}) -ENDFOREACH (testp ${H5P_TESTS}) +endforeach (testp ${H5P_TESTS}) -IF (NOT WIN32) +if (NOT WIN32) ADD_H5P_EXE(t_posix_compliant) -ENDIF (NOT WIN32) +endif (NOT WIN32) -INCLUDE (CMakeTests.cmake) +include (CMakeTests.cmake) diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake index 9a94ed0..5ac96e6 100644 --- a/testpar/CMakeTests.cmake +++ b/testpar/CMakeTests.cmake @@ -5,17 +5,17 @@ ############################################################################## ############################################################################## -ADD_TEST (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:testphdf5>) +add_test (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:testphdf5>) -FOREACH (testp ${H5P_TESTS}) - ADD_TEST (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:${testp}>) -ENDFOREACH (testp ${H5P_TESTS}) +foreach (testp ${H5P_TESTS}) + add_test (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:${testp}>) +endforeach (testp ${H5P_TESTS}) SET_TESTS_PROPERTIES(TEST_PAR_t_pflush2 PROPERTIES DEPENDS TEST_PAR_t_pflush1) -IF (HDF5_TEST_VFD) +if (HDF5_TEST_VFD) - SET (VFD_LIST + set (VFD_LIST sec2 stdio core @@ -24,19 +24,19 @@ IF (HDF5_TEST_VFD) family ) - SET (H5P_VFD_TESTS + set (H5P_VFD_TESTS t_pflush1 t_pflush2 ) - 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) - FOREACH (test ${H5P_VFD_TESTS}) - ADD_TEST ( + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + foreach (test ${H5P_VFD_TESTS}) + add_test ( NAME VFD-${vfdname}-${test} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:${test}>" @@ -47,13 +47,13 @@ IF (HDF5_TEST_VFD) -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake" ) - ENDFOREACH (test ${H5P_VFD_TESTS}) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + endforeach (test ${H5P_VFD_TESTS}) + 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) |