2014-03-13 23:05:09 +08:00
|
|
|
cmake_minimum_required (VERSION 2.8.11)
|
2010-05-14 00:01:50 +08:00
|
|
|
PROJECT (HDF5_PERFORM )
|
|
|
|
|
2012-09-19 06:08:07 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Apply Definitions to compiler in this directory and below
|
|
|
|
#-----------------------------------------------------------------------------
|
2014-05-15 03:50:28 +08:00
|
|
|
add_definitions (${HDF_EXTRA_C_FLAGS})
|
2012-09-19 06:08:07 +08:00
|
|
|
|
2010-05-14 00:01:50 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Setup include Directories
|
|
|
|
#-----------------------------------------------------------------------------
|
2010-09-01 04:15:13 +08:00
|
|
|
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
|
|
|
|
INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib )
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2011-03-25 01:21:42 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Add the executables
|
|
|
|
# --------------------------------------------------------------------
|
2010-05-14 00:01:50 +08:00
|
|
|
#-- Adding test for h5perf_serial
|
2014-03-12 05:14:57 +08:00
|
|
|
set (h5perf_serial_SRCS
|
2010-05-14 00:01:50 +08:00
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/sio_perf.c
|
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c
|
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
add_executable (h5perf_serial ${h5perf_serial_SRCS})
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (h5perf_serial ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (h5perf_serial " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
|
|
|
|
set_target_properties (h5perf_serial PROPERTIES FOLDER perform)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
if (HDF5_BUILD_PERFORM_STANDALONE)
|
2010-12-13 21:31:44 +08:00
|
|
|
#-- Adding test for h5perf_serial_alone
|
2014-03-12 05:14:57 +08:00
|
|
|
set (h5perf_serial_alone_SRCS
|
2010-12-13 21:31:44 +08:00
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/sio_perf.c
|
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c
|
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
add_executable (h5perf_serial_alone ${h5perf_serial_alone_SRCS})
|
|
|
|
set_property (TARGET h5perf_serial_alone
|
2010-12-13 21:31:44 +08:00
|
|
|
APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
|
|
|
|
)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (h5perf_serial_alone ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (h5perf_serial_alone " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
|
|
|
|
set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform)
|
|
|
|
endif (HDF5_BUILD_PERFORM_STANDALONE)
|
2010-12-13 21:31:44 +08:00
|
|
|
|
2010-05-14 00:01:50 +08:00
|
|
|
#-- Adding test for chunk
|
2014-03-12 05:14:57 +08:00
|
|
|
set (chunk_SRCS
|
2010-05-14 00:01:50 +08:00
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/chunk.c
|
|
|
|
)
|
|
|
|
ADD_EXECUTABLE(chunk ${chunk_SRCS})
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (chunk ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (chunk " " " ")
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
|
2014-03-12 05:14:57 +08:00
|
|
|
set_target_properties (chunk PROPERTIES FOLDER perform)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
#-- Adding test for iopipe
|
2014-03-12 05:14:57 +08:00
|
|
|
set (iopipe_SRCS
|
2010-05-14 00:01:50 +08:00
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/iopipe.c
|
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
add_executable (iopipe ${iopipe_SRCS})
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (iopipe ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (iopipe " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
|
|
|
|
set_target_properties (iopipe PROPERTIES FOLDER perform)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
#-- Adding test for overhead
|
2014-03-12 05:14:57 +08:00
|
|
|
set (overhead_SRCS
|
2010-05-14 00:01:50 +08:00
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/overhead.c
|
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
add_executable (overhead ${overhead_SRCS})
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (overhead ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (overhead " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
|
|
|
|
set_target_properties (overhead PROPERTIES FOLDER perform)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2014-12-22 22:45:46 +08:00
|
|
|
if (BUILD_TESTING)
|
2010-05-14 00:01:50 +08:00
|
|
|
#-- Adding test for perf_meta
|
2014-12-22 22:45:46 +08:00
|
|
|
set (perf_meta_SRCS
|
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/perf_meta.c
|
|
|
|
)
|
|
|
|
add_executable (perf_meta ${perf_meta_SRCS})
|
|
|
|
TARGET_NAMING (perf_meta ${LIB_TYPE})
|
|
|
|
TARGET_C_PROPERTIES (perf_meta " " " ")
|
|
|
|
target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
|
|
|
|
set_target_properties (perf_meta PROPERTIES FOLDER perform)
|
|
|
|
endif (BUILD_TESTING)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
#-- Adding test for zip_perf
|
2014-03-12 05:14:57 +08:00
|
|
|
set (zip_perf_SRCS
|
2010-05-14 00:01:50 +08:00
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/zip_perf.c
|
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
add_executable (zip_perf ${zip_perf_SRCS})
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (zip_perf ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (zip_perf " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
|
|
|
|
set_target_properties (zip_perf PROPERTIES FOLDER perform)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2014-12-22 22:45:46 +08:00
|
|
|
if (H5_HAVE_PARALLEL AND BUILD_TESTING)
|
2010-09-01 04:15:13 +08:00
|
|
|
#-- Adding test for h5perf
|
2014-03-12 05:14:57 +08:00
|
|
|
set (h5perf_SRCS
|
2010-09-01 04:15:13 +08:00
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/pio_perf.c
|
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c
|
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
add_executable (h5perf ${h5perf_SRCS})
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (h5perf ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (h5perf " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
|
|
|
|
set_target_properties (h5perf PROPERTIES FOLDER perform)
|
2010-09-01 04:15:13 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
if (HDF5_BUILD_PERFORM_STANDALONE)
|
2010-12-13 21:31:44 +08:00
|
|
|
#-- Adding test for h5perf
|
2014-03-12 05:14:57 +08:00
|
|
|
set (h5perf_alone_SRCS
|
2010-12-13 21:31:44 +08:00
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/pio_perf.c
|
|
|
|
${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c
|
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
add_executable (h5perf_alone ${h5perf_alone_SRCS})
|
|
|
|
set_property (TARGET h5perf_alone
|
2010-12-13 21:31:44 +08:00
|
|
|
APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
|
|
|
|
)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (h5perf_alone ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (h5perf_alone " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
|
|
|
|
set_target_properties (h5perf_alone PROPERTIES FOLDER perform)
|
|
|
|
endif (HDF5_BUILD_PERFORM_STANDALONE)
|
2014-12-22 22:45:46 +08:00
|
|
|
endif (H5_HAVE_PARALLEL AND BUILD_TESTING)
|
2011-03-25 01:21:42 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
include (CMakeTests.cmake)
|