2013-01-15 02:35:30 +08:00
|
|
|
cmake_minimum_required (VERSION 2.8.10)
|
2010-05-14 00:01:50 +08:00
|
|
|
PROJECT (HDF5_EXAMPLES)
|
|
|
|
|
2012-09-19 06:08:07 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Apply Definitions to compiler in this directory and below
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
|
|
|
|
|
2010-05-14 00:01:50 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Define Sources
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
SET (examples
|
2012-12-12 12:00:34 +08:00
|
|
|
h5_crtdat
|
|
|
|
h5_rdwt
|
|
|
|
h5_crtatt
|
|
|
|
h5_crtgrp
|
|
|
|
h5_crtgrpar
|
|
|
|
h5_crtgrpd
|
|
|
|
h5_cmprss
|
|
|
|
h5_extend
|
|
|
|
h5_subset
|
2010-05-14 00:01:50 +08:00
|
|
|
h5_write
|
|
|
|
h5_read
|
|
|
|
h5_extend_write
|
|
|
|
h5_chunk_read
|
|
|
|
h5_compound
|
|
|
|
h5_group
|
|
|
|
h5_select
|
|
|
|
h5_attribute
|
|
|
|
h5_mount
|
|
|
|
h5_reference
|
|
|
|
h5_drivers
|
|
|
|
h5_ref2reg
|
|
|
|
h5_extlink
|
|
|
|
h5_elink_unix2win
|
|
|
|
h5_shared_mesg
|
|
|
|
)
|
|
|
|
|
|
|
|
FOREACH (example ${examples})
|
|
|
|
ADD_EXECUTABLE (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (${example} ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (${example} " " " ")
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (${example} ${HDF5_LIB_TARGET})
|
2011-10-26 00:52:58 +08:00
|
|
|
SET_TARGET_PROPERTIES (${example} PROPERTIES FOLDER examples)
|
2010-05-14 00:01:50 +08:00
|
|
|
ENDFOREACH (example ${examples})
|
|
|
|
|
|
|
|
IF (H5_HAVE_PARALLEL)
|
|
|
|
ADD_EXECUTABLE (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (ph5example ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (ph5example " " " ")
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (ph5example ${HDF5_LIB_TARGET})
|
2011-10-26 00:52:58 +08:00
|
|
|
SET_TARGET_PROPERTIES (ph5example PROPERTIES FOLDER examples)
|
2010-05-14 00:01:50 +08:00
|
|
|
ENDIF (H5_HAVE_PARALLEL)
|
2011-03-25 04:22:37 +08:00
|
|
|
|
|
|
|
IF (BUILD_TESTING)
|
2013-08-20 05:49:44 +08:00
|
|
|
INCLUDE (CMakeTests.cmake)
|
2011-03-25 04:22:37 +08:00
|
|
|
ENDIF (BUILD_TESTING)
|