diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-04-23 17:32:13 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-04-23 17:32:13 (GMT) |
commit | d896ff95b1b75e9c1fcc9a2b6c42fd4f75d5682f (patch) | |
tree | 88d62043c67f0ff356d66bb3622b1e8993217172 | |
parent | 82869120a9285025f4aee7f1839c24730885cde1 (diff) | |
download | hdf5-d896ff95b1b75e9c1fcc9a2b6c42fd4f75d5682f.zip hdf5-d896ff95b1b75e9c1fcc9a2b6c42fd4f75d5682f.tar.gz hdf5-d896ff95b1b75e9c1fcc9a2b6c42fd4f75d5682f.tar.bz2 |
[svn-r23612] Update cmake and windows usage instructions
-rw-r--r-- | release_docs/CMake.txt | 2 | ||||
-rw-r--r-- | release_docs/USING_CMake.txt | 86 | ||||
-rw-r--r-- | release_docs/USING_Windows.txt | 63 |
3 files changed, 85 insertions, 66 deletions
diff --git a/release_docs/CMake.txt b/release_docs/CMake.txt index d13e1e5..08894cf 100644 --- a/release_docs/CMake.txt +++ b/release_docs/CMake.txt @@ -119,7 +119,7 @@ Notes: This short instruction is written for users who want to quickly build * <HDF5OPTION>:BOOL=[ON | OFF] <cacheinit.cmake> is: - # This is the CMakeCache file. + # This is the CMakeCache file used by HDF Group for daily tests. ######################## # EXTERNAL cache entries ######################## diff --git a/release_docs/USING_CMake.txt b/release_docs/USING_CMake.txt index eafec25..dc286d2 100644 --- a/release_docs/USING_CMake.txt +++ b/release_docs/USING_CMake.txt @@ -1,5 +1,5 @@ ************************************************************************ -* Build and Install HDF5 Applications with CMake * +* Build and Install HDF5 Applications with CMake * ************************************************************************ Notes: This short instruction is written for users who want to quickly build @@ -50,17 +50,18 @@ Notes: This short instruction is written for users who want to quickly build (See the appendix at the bottom of this file for an example of using a non-cmake built HDF5 binary) - 3. On Windows with Visual Studio, if you have installed the static HDF5 - library, you will need to add the HDF5\lib folder to the library - search list. See the "Using Static Libraries with Visual Studio" section. - - 4. Set the environment variable HDF5_DIR to the installed location of the + 3. Set the environment variable HDF5_DIR to the installed location of the config files for HDF5. On Windows HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.8.x/cmake/hdf5 - (Note there are no quote characters used on windows) + (Note there are no quote characters used on windows and use forward slashes) + + 4. Created separate source and build directories. + (CMake commands are executed in the build directory) + + 5. Created a CMakeLists.txt file(s) for your source. See Section II below. ======================================================================== - Building HDF5 Applications with CMake +I. Building HDF5 Applications with CMake ======================================================================== 1. Run CMake @@ -164,54 +165,12 @@ Notes: This short instruction is written for users who want to quickly build www.cmake.org. -========================================================================== -Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008 -========================================================================== - - 8. Set up path for external libraries and headers - - Invoke Microsoft Visual Studio and go to "Tools" and select "Options", - find "Projects", and then "VC++ Directories". - - 8.1 If you are building on 64-bit Windows, find the "Platform" dropdown - 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\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\1.8.x\lib) - to the library directories. - - 8.4 If using Fortran libraries, you will also need to setup the path - for the Intel Fortran compiler. - - ======================================================================== - Using Visual Studio 2010 with HDF5 Libraries built with Visual Studio 2010 +II. Minimum C Project Files for CMake ======================================================================== - 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 -======================================================================== - - 10. Create a CMakeLists.txt file at the source root. -.......................................................................... + 8. Create a CMakeLists.txt file at the source root. +########################################################## cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5MyApp C CXX) @@ -222,22 +181,23 @@ SET (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES}) ADD_EXECUTABLE (hdf_example ${PROJECT_SOURCE_DIR}/hdf_example.c) TARGET_LINK_LIBRARIES (hdf_example ${LINK_LIBS}) -.......................................................................... +########################################################## -************************************************************************ - APPENDIX +======================================================================== +III. APPENDIX +======================================================================== Below is 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 -======================================================================== +############################################################################ +# 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.10 FATAL_ERROR) @@ -272,7 +232,7 @@ 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 diff --git a/release_docs/USING_Windows.txt b/release_docs/USING_Windows.txt index 97ac4ad..f12bfa7 100644 --- a/release_docs/USING_Windows.txt +++ b/release_docs/USING_Windows.txt @@ -6,8 +6,8 @@ We now recommend that users build, test and install HDF5 using CMake. -Instructions for building and testing HDF5 applications using CMake can be found in -the USING_CMake.txt file found in this folder. +Instructions for building and testing HDF5 applications using CMake can +be found in the CMake.txt and USING_CMake.txt files found in this folder. ======================================================================== @@ -30,6 +30,65 @@ using the Visual C++ Development Environment. http://hdfgroup.org/HDF5-FAQ.html +The following two sections are helpful if you do not use CMake to build +your applications. + +======================================================================== +Using Visual Studio 2010 with HDF5 Libraries built with Visual Studio 2010 +======================================================================== + + 2. 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". + + 2.1 If you are building on 64-bit Windows, find the "Platform" dropdown + and select "x64". + + 2.2 Add the header path to the "Include Directories" setting. + + 2.3 Add the library path to the "Library Directories" setting. + + 2.4 Select Linker->Input and beginning with the + "Additional Dependencies" line, enter the library names. The + external libraries should be listed first, followed by the HDF5 + library, and then optionally the HDF5 High Level, Fortran or C++ + libraries. For example, to compile a C++ application, enter: + + szip.lib zlib.lib hdf5dll.lib hdf5_cppdll.lib + + +========================================================================== +Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008 +========================================================================== + + 3. Set up path for external libraries and headers + + Invoke Microsoft Visual Studio and go to "Tools" and select "Options", + find "Projects", and then "VC++ Directories". + + 3.1 If you are building on 64-bit Windows, find the "Platform" dropdown + and select "x64". + + 3.2 Find the box "Show directories for", choose "Include files", add the + header path (i.e. c:\Program Files\HDF_Group\HDF5\1.8.x\include) + to the included directories. + + 3.3 Find the box "Show directories for", choose "Library files", add the + library path (i.e. c:\Program Files\HDF_Group\HDF5\1.8.x\lib) + to the library directories. + + 3.4 If using Fortran libraries, you will also need to setup the path + for the Intel Fortran compiler. + + 3.5 Select Project->Properties->Linker->Input and beginning with the + "Additional Dependencies" line, enter the library names. The + external libraries should be listed first, followed by the HDF5 + library, and then optionally the HDF5 High Level, Fortran or C++ + libraries. For example, to compile a C++ application, enter: + + szip.lib zlib.lib hdf5dll.lib hdf5_cppdll.lib ************************************************************************ Please send email to help@hdfgroup.org for further assistance. |