summaryrefslogtreecommitdiffstats
path: root/release_docs/USING_CMake.txt
diff options
context:
space:
mode:
Diffstat (limited to 'release_docs/USING_CMake.txt')
-rw-r--r--release_docs/USING_CMake.txt88
1 files changed, 79 insertions, 9 deletions
diff --git a/release_docs/USING_CMake.txt b/release_docs/USING_CMake.txt
index 71f2fcf..0e980ea 100644
--- a/release_docs/USING_CMake.txt
+++ b/release_docs/USING_CMake.txt
@@ -4,14 +4,14 @@
Notes: This short instruction is written for users who want to quickly build
HDF5 Applications from the HDF5 Examples package using the CMake tools.
- Users can adapt these instructions for their own applicaltions, see the
+ Users can adapt these instructions for their own applications, see the
"Minimum Project Files" section.
More information about using CMake can be found at the KitWare site,
www.cmake.org.
CMake uses the command line, however the visual CMake tool is
- available for the configuration step. The steps are similiar for
+ available for the configuration step. The steps are similar for
all the operating systems supported by CMake.
NOTES:
@@ -31,13 +31,17 @@ Notes: This short instruction is written for users who want to quickly build
Please read the HDF and CDash document at:
www.hdfgroup.org/CDash/HowToSubmit.
+ 4. See the appendix at the bottom of this file for an example of using
+ a ctest script for building and testing. See CMake.txt for more
+ information.
+
========================================================================
Preconditions
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.8.x product requires CMake version 2.8.6 (minimum).
+ web site. The HDF5 1.8.x product requires CMake version 2.8.10 (minimum).
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).
@@ -62,7 +66,7 @@ Notes: This short instruction is written for users who want to quickly build
available in your Start menu. For Linux, UNIX, and Mac users the
executable is named "cmake-gui" and can be found where CMake was
installed.
- Specify the source and build directories. It is recommemded that you
+ Specify the source and build directories. It is recommended that you
choose a build directory different then the source directory
(for example on Windows, if the source is at c:\MyHDFstuff\hdf5, then
use c:\MyHDFstuff\hdf5\build or c:\MyHDFstuff\build\hdf5).
@@ -156,7 +160,7 @@ Notes: This short instruction is written for users who want to quickly build
========================================================================
- Using HDF5 Libraries with Visual Studio 2008
+ Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008
========================================================================
8. Set up path for external libraries and headers
@@ -168,11 +172,11 @@ Notes: This short instruction is written for users who want to quickly build
and select "x64".
8.2 Find the box "Show directories for", choose "Include files", add the
- header path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.7\include)
+ header path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.x\include)
to the included directories.
8.3 Find the box "Show directories for", choose "Library files", add the
- library path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.7\lib)
+ library path (i.e. c:\Program Files\HDF Group\HDF5\hdf5-1.8.x\lib)
to the library directories.
8.4 If using Fortran libraries, you will also need to setup the path
@@ -180,12 +184,30 @@ Notes: This short instruction is written for users who want to quickly build
========================================================================
+ Using Visual Studio 2010 with HDF5 Libraries built with Visual Studio 2010
+========================================================================
+
+ 9. Set up path for external libraries and headers
+
+ The path settings will need to be in project property sheets per project.
+ Go to "Project" and select "Properties", find "Configuration Properties",
+ and then "VC++ Directories".
+
+ 9.1 If you are building on 64-bit Windows, find the "Platform" dropdown
+ and select "x64".
+
+ 9.2 Add the header path to the "Include Directories" setting.
+
+ 9.3 Add the library path to the "Library Directories" setting.
+
+
+========================================================================
Minimum C Project Files for CMake
========================================================================
- 9. Create a CMakeLists.txt file at the source root.
+ 10. Create a CMakeLists.txt file at the source root.
..........................................................................
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5MyApp C CXX)
FIND_PACKAGE (HDF5 REQURIED)
@@ -196,7 +218,55 @@ ADD_EXECUTABLE (hdf_example ${PROJECT_SOURCE_DIR}/hdf_example.c)
TARGET_LINK_LIBRARIES (hdf_example ${LINK_LIBS})
..........................................................................
+
+************************************************************************
+ APPENDIX
+
+Below ia an example of the ctest script used by The HDF Group. See the
+Appendix in the CMake.txt file for the CTestScript.cmake file used by this
+script.
+
************************************************************************
+Product specific script, HDF518Example.cmake, that uses the
+CTestScript.cmake file (see Appendix in the CMake.txt). Usage:
+"ctest -S HDF518Example.cmake,hdf518Examples -C Release -O hdf518EX.log"
+where hdf518Examples is the source folder relative to the location of these scripts
+========================================================================
+
+cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+
+set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
+set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
+set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
+set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
+set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
+set(CTEST_BUILD_CONFIGURATION "Release")
+set(MODEL "Experimental")
+
+# build generator name, see cmake generator list
+set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+
+# machine description, can be removed on linux
+set(CTEST_SITE "machine.domain")
+set(SITE_OS_NAME "os name")
+set(SITE_OS_VERSION "os version")
+set(SITE_OS_BITS "os size")
+set(SITE_COMPILER_NAME "compiler name")
+set(SITE_COMPILER_VERSION "compiler version")
+
+
+# needed for source updates, change as required
+set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5-examples/trunk/1_8")
+
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5Examples-1.8")
+
+# location of the installed hdf5 (cmake configuration folder)
+set(ENV{HDF5_DIR} "/usr/share/cmake/hdf5")
+
+include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
+
+message("DONE")
+
Need further assistance, send email to help@hdfgroup.org