summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-11-07 18:37:49 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-11-07 18:37:49 (GMT)
commit93197c0257a23423a6e1c3bb7d82f8abe87b81e0 (patch)
tree159f403cfc6fa5ea2c02fc44035230f3710de1be
parent43690b681c1fc29dcffb199e53f175b898f44baf (diff)
downloadhdf5-93197c0257a23423a6e1c3bb7d82f8abe87b81e0.zip
hdf5-93197c0257a23423a6e1c3bb7d82f8abe87b81e0.tar.gz
hdf5-93197c0257a23423a6e1c3bb7d82f8abe87b81e0.tar.bz2
[svn-r24412] Updated information on how to build examples with cmake installed binary.
-rw-r--r--config/cmake/HDF518_Examples.cmake.in15
-rw-r--r--release_docs/USING_CMake_Examples.txt83
2 files changed, 82 insertions, 16 deletions
diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in
index 699e2d0..74da91c 100644
--- a/config/cmake/HDF518_Examples.cmake.in
+++ b/config/cmake/HDF518_Examples.cmake.in
@@ -11,13 +11,16 @@ set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@")
set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
set(CTEST_BUILD_CONFIGURATION "Release")
+#set(NO_MAC_FORTRAN "true")
+#set(BUILD_OPTIONS ""${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON)
###############################################################################################################
# Adjust the following SET Commands as needed
###############################################################################################################
if(WIN32)
if(STATICLIBRARIES)
- set(BUILD_OPTIONS "-DUSE_SHARED_LIBS:BOOL=OFF")
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF")
endif(STATICLIBRARIES)
set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake/hdf5")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
@@ -25,7 +28,7 @@ if(WIN32)
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
else(WIN32)
if(STATICLIBRARIES)
- set(BUILD_OPTIONS "-DUSE_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
endif(STATICLIBRARIES)
set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake/hdf5")
set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib")
@@ -48,8 +51,12 @@ if(APPLE)
execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
set(ENV{CC} "${XCODE_CC}")
set(ENV{CXX} "${XCODE_CXX}")
- # Shared fortran is not supported, build static
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ if(NOT NO_MAC_FORTRAN)
+ # Shared fortran is not supported, build static
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ else(NOT NO_MAC_FORTRAN)
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+ endif(NOT NO_MAC_FORTRAN)
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
endif(APPLE)
diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt
index 33c43a3..bc2a13b 100644
--- a/release_docs/USING_CMake_Examples.txt
+++ b/release_docs/USING_CMake_Examples.txt
@@ -1,12 +1,71 @@
-The compressed examples file, located in the HDF5 install folder,
-can be built and tested with CMake and the supplied
-HDF518_Examples.cmake file. It is recommended that you copy those
-two files to your development location before continuing.
-
-The command line to be used is shown at the top of the file. Also,
-the location of the HDF5 installation should be verified and
-changed if necessary.
-
-When executed, the ctest script will save the results to the log file
-indicated by the ctest command. If you wish the to see more build
-and test information, add "-VV" to the ctest command.
+************************************************************************
+* Build and Test HDF5 Examples with CMake *
+************************************************************************
+
+Notes: This short instruction is written for users who want to quickly
+ test the installation of HDF5 by using the CMake tools to build
+ and test the HDF5 Examples. The following instructions will show
+ the default usage and then present common changes for non-default
+ installations.
+ For more information, see the USING_HDF5_CMake.txt file.
+
+ More information about using CMake can be found at the KitWare
+ site, www.cmake.org.
+
+ CMake uses the command line and these instructions use the script
+ method of the ctest command.
+
+
+========================================================================
+I. Preconditions
+========================================================================
+
+ 1. We suggest you obtain the latest CMake for windows from the Kitware
+ web site. The HDF5 1.8.x product requires a minimum CMake version
+ of 2.8.10.
+
+ 2. You have installed the HDF5 library built with CMake, by executing
+ the HDF Install Utility (the *.exe file in the binary package for
+ Windows). If you are using a Windows platform, you can obtain a
+ pre-built Windows binary from The HDF Group's website at
+ www.hdfgroup.org.
+
+
+
+========================================================================
+II. Building HDF5 Examples with CMake
+========================================================================
+
+Files in the HDF5 install directory:
+ HDF5Examples-0.1.1-Source.zip (or HDF5Examples-0.1.1-Source.tar.gz)
+ HDF518_Examples.cmake
+
+Default installation process:
+ Create a directory to run the examples, i.e. \test_hdf5.
+ Copy HDF5Examples-0.1.1-Source.zip to this directory, do NOT unzip.
+ Copy HDF518_Examples.cmake to this directory.
+ Execute from this directory:
+ ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log
+
+The script will uncompress the examples file HDF5Examples-0.1.1-Source.zip,
+ and create a build directory inside the HDF5Examples-0.1.1-Source directory.
+ It will then configure, build, and execute the examples. All the log files
+ will be found under the build\Testing\Temporary directory, check these for
+ errors.
+
+The amount of script information can be increased by adding -V to the ctest
+ command. Even more information can be shown by adding -VV instead of -V.
+
+
+========================================================================
+III. Common changes to the HDF518_Examples.cmake file
+========================================================================
+
+Line 8: change the INSTALLDIR to a different HDF5 install location.
+
+Line 14: uncomment to allow Mac machines to build shared examples.
+
+Line 15: uncomment to not build and test Fortran examples.
+
+Line 16: uncomment to build and test Fortran examples with F2003 option.
+