2015-02-19 00:56:22 +08:00
|
|
|
cmake_minimum_required (VERSION 3.1.0)
|
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
|
|
|
|
#-----------------------------------------------------------------------------
|
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
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Define Sources
|
|
|
|
#-----------------------------------------------------------------------------
|
2014-03-12 05:14:57 +08:00
|
|
|
set (examples
|
2015-08-28 05:52:15 +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
|
2015-02-25 12:19:41 +08:00
|
|
|
h5_vds
|
2015-03-11 22:25:20 +08:00
|
|
|
h5_vds-exc
|
|
|
|
h5_vds-exclim
|
|
|
|
h5_vds-eiger
|
|
|
|
h5_vds-simpleIO
|
2015-03-25 06:56:24 +08:00
|
|
|
h5_vds-percival
|
2015-05-06 05:35:10 +08:00
|
|
|
h5_vds-percival-unlim
|
|
|
|
h5_vds-percival-unlim-maxmin
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
foreach (example ${examples})
|
|
|
|
add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
|
2015-08-05 23:56:58 +08:00
|
|
|
TARGET_NAMING (${example} STATIC)
|
|
|
|
TARGET_C_PROPERTIES (${example} STATIC " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (${example} ${HDF5_LIB_TARGET})
|
|
|
|
set_target_properties (${example} PROPERTIES FOLDER examples)
|
2015-08-05 23:56:58 +08:00
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
add_executable (${example}-shared ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
|
|
|
|
TARGET_NAMING (${example}-shared SHARED)
|
|
|
|
TARGET_C_PROPERTIES (${example}-shared SHARED " " " ")
|
|
|
|
target_link_libraries (${example}-shared ${HDF5_LIBSH_TARGET})
|
|
|
|
set_target_properties (${example}-shared PROPERTIES FOLDER examples)
|
|
|
|
endif (BUILD_SHARED_LIBS)
|
2014-03-12 05:14:57 +08:00
|
|
|
endforeach (example ${examples})
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2014-03-21 05:18:30 +08:00
|
|
|
if (H5_HAVE_PARALLEL)
|
2014-03-12 05:14:57 +08:00
|
|
|
add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
|
2015-08-05 23:56:58 +08:00
|
|
|
TARGET_NAMING (ph5example STATIC)
|
|
|
|
TARGET_C_PROPERTIES (ph5example STATIC " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (ph5example ${HDF5_LIB_TARGET})
|
|
|
|
set_target_properties (ph5example PROPERTIES FOLDER examples)
|
2015-08-05 23:56:58 +08:00
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
add_executable (ph5example-shared ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
|
|
|
|
TARGET_NAMING (ph5example-shared SHARED)
|
|
|
|
TARGET_C_PROPERTIES (ph5example-shared SHARED " " " ")
|
|
|
|
target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET})
|
|
|
|
set_target_properties (ph5example-shared PROPERTIES FOLDER examples)
|
|
|
|
endif (BUILD_SHARED_LIBS)
|
2014-03-21 05:18:30 +08:00
|
|
|
endif (H5_HAVE_PARALLEL)
|
2011-03-25 04:22:37 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
if (BUILD_TESTING)
|
|
|
|
include (CMakeTests.cmake)
|
|
|
|
endif (BUILD_TESTING)
|