2010-05-27 00:47:12 +08:00
|
|
|
************************************************************************
|
2014-05-06 03:40:19 +08:00
|
|
|
* Build and Install HDF5 C, C++, Fortran and High-Level Libraries *
|
|
|
|
* and tools with CMake *
|
2010-05-27 00:47:12 +08:00
|
|
|
************************************************************************
|
|
|
|
|
2013-04-29 22:18:34 +08:00
|
|
|
Table of Contents
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
Section I: Preconditions
|
2015-08-28 05:46:50 +08:00
|
|
|
Section II: Quick Step Building HDF5 Libraries with CMake Script Mode
|
2014-05-06 03:40:19 +08:00
|
|
|
Section III: Quick Step Building HDF5 Libraries with CMake Command Mode
|
2015-08-28 05:46:50 +08:00
|
|
|
Section IV: Further considerations
|
2014-05-06 03:40:19 +08:00
|
|
|
Section V: Options for building HDF5 Libraries with CMake command line
|
|
|
|
Section VI: CMake option defaults for HDF5
|
|
|
|
Section VII: User Defined Options for HDF5 Libraries with CMake
|
|
|
|
Section VIII: Options for platform configuration files
|
2013-04-29 22:18:34 +08:00
|
|
|
|
|
|
|
************************************************************************
|
|
|
|
|
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
========================================================================
|
|
|
|
I. Preconditions
|
|
|
|
========================================================================
|
2015-08-28 05:46:50 +08:00
|
|
|
Obtaining HDF5 source code
|
2014-05-06 03:40:19 +08:00
|
|
|
1. Create a directory for your development; for example, "myhdfstuff".
|
|
|
|
|
|
|
|
2. Obtain compressed (*.tar or *.zip) HDF5 source from
|
|
|
|
http://www.hdfgroup.org/ftp/HDF5/current/src/
|
|
|
|
and put it in "myhdfstuff".
|
2016-03-15 03:10:30 +08:00
|
|
|
Uncompress the file. There should be a hdf5-1.10."X" folder.
|
2014-05-06 03:40:19 +08:00
|
|
|
|
|
|
|
CMake version
|
2015-08-28 05:46:50 +08:00
|
|
|
1. We suggest you obtain the latest CMake from the Kitware web site.
|
2016-03-15 03:10:30 +08:00
|
|
|
The HDF5 1.10."X" product requires a minimum CMake version 3.1.0,
|
2015-08-28 05:46:50 +08:00
|
|
|
where "X" is the current HDF5 release version.
|
2014-05-06 03:40:19 +08:00
|
|
|
|
2015-09-22 04:52:35 +08:00
|
|
|
Note:
|
|
|
|
To change the install prefix from the platform defaults initialize
|
|
|
|
the CMake variable, CMAKE_INSTALL_PREFIX.
|
|
|
|
|
2013-04-29 22:18:34 +08:00
|
|
|
|
|
|
|
========================================================================
|
2014-05-06 03:40:19 +08:00
|
|
|
II. Quick Step Building HDF5 Libraries with CMake Script Mode
|
2014-02-01 02:15:02 +08:00
|
|
|
========================================================================
|
2015-08-28 05:46:50 +08:00
|
|
|
This short set of instructions is written for users who want to quickly
|
|
|
|
build the HDF5 C and C++ static libraries and tools with SZIP and ZLIB
|
|
|
|
compression included. This procedure will use the default settings in
|
2015-05-04 23:14:37 +08:00
|
|
|
the config/cmake/cacheinit.cmake file.
|
2014-05-06 03:40:19 +08:00
|
|
|
HDF Group recommends using the ctest script mode to build HDF5.
|
|
|
|
|
|
|
|
The following files referenced below are available at the HDF web site:
|
2014-04-29 05:40:17 +08:00
|
|
|
http://www.hdfgroup.org/HDF5/release/cmakebuild.html
|
2014-02-01 02:15:02 +08:00
|
|
|
|
2015-05-04 23:14:37 +08:00
|
|
|
Single compressed file with all the files needed, including source:
|
2016-03-15 03:10:30 +08:00
|
|
|
hdf5-1.10.0-CMake.zip or hdf5-1.10.0-CMake.tar.gz
|
2015-05-04 23:14:37 +08:00
|
|
|
|
|
|
|
Individual files
|
|
|
|
-----------------------------------------------
|
2014-05-06 03:40:19 +08:00
|
|
|
CMake build script:
|
|
|
|
CTestScript.cmake
|
2014-02-01 02:15:02 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
External compression szip and zlib libraries:
|
|
|
|
SZip.tar.gz
|
|
|
|
ZLib.tar.gz
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
Platform configuration files:
|
2015-04-23 23:41:22 +08:00
|
|
|
HDF518config.cmake
|
2015-05-04 23:14:37 +08:00
|
|
|
-----------------------------------------------
|
2014-05-06 03:40:19 +08:00
|
|
|
|
|
|
|
To build HDF5 with the SZIP and ZLIB external libraries you will need to:
|
2014-02-01 02:15:02 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
1. Change to the development directory "myhdfstuff".
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
2. Download the SZip.tar.gz and ZLib.tar.gz to "myhdfstuff".
|
|
|
|
Do not uncompress the files.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
3. Download the CTestScript.cmake file to "myhdfstuff".
|
2015-08-28 05:46:50 +08:00
|
|
|
CTestScript.cmake file should not be modified.
|
|
|
|
|
2015-05-04 23:14:37 +08:00
|
|
|
4. Download the platform configuration file, HDF518config.cmake,
|
|
|
|
to "myhdfstuff". Do not modify the file unless you want to change
|
|
|
|
default build environment. (See http://www.hdfgroup.org/HDF5/release/chgcmkbuild.html)
|
2014-05-06 03:40:19 +08:00
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
5. From the "myhdfstuff" directory execute the CTest Script with the
|
2014-05-06 03:40:19 +08:00
|
|
|
following options:
|
|
|
|
|
2015-04-23 23:41:22 +08:00
|
|
|
On 32-bit Windows with Visual Studio 2012, execute:
|
2016-03-15 03:10:30 +08:00
|
|
|
ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2012 -C Release -VV -O hdf5.log
|
2015-04-23 23:41:22 +08:00
|
|
|
On 64-bit Windows with Visual Studio 2012, execute:
|
2016-03-15 03:10:30 +08:00
|
|
|
ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf5.log
|
2015-04-23 23:41:22 +08:00
|
|
|
On 32-bit Windows with Visual Studio 2013, execute:
|
2016-03-15 03:10:30 +08:00
|
|
|
ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2013 -C Release -VV -O hdf5.log
|
2015-04-23 23:41:22 +08:00
|
|
|
On 64-bit Windows with Visual Studio 2013, execute:
|
2016-03-15 03:10:30 +08:00
|
|
|
ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201364 -C Release -VV -O hdf5.log
|
2015-04-23 23:41:22 +08:00
|
|
|
On Linux and Mac, execute:
|
2016-03-15 03:10:30 +08:00
|
|
|
ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -VV -O hdf5.log
|
2014-05-06 03:40:19 +08:00
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
The command above will configure, build, test, and create an install
|
2015-05-04 23:14:37 +08:00
|
|
|
package in the myhdfstuff folder. It will have the format:
|
2016-03-15 03:10:30 +08:00
|
|
|
HDF5-1.10.NN-<platform>.<zip or tar.gz>
|
2014-05-06 03:40:19 +08:00
|
|
|
|
2015-05-04 23:14:37 +08:00
|
|
|
On Unix, <platform> will be "Linux". A similar .sh file will also be created.
|
2015-08-28 05:46:50 +08:00
|
|
|
On Windows, <platform> will be "win64" or "win32". If you have an
|
|
|
|
installer on your system, you will also see a similar file that ends
|
2015-05-04 23:14:37 +08:00
|
|
|
in either .exe (NSIS) or .msi (WiX).
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
The -S option uses the script version of ctest.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
The value for the -C option (as shown above, "-C Release") must
|
2016-08-23 01:22:38 +08:00
|
|
|
match the setting for CTEST_CONFIGURATION_TYPE in the platform
|
2014-05-06 03:40:19 +08:00
|
|
|
configuration file.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2015-05-04 23:14:37 +08:00
|
|
|
The -VV option is for most verbose; use -V for less verbose.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
The "-O hdf5.log" option saves the output to a log file hdf5.log.
|
2014-02-01 02:15:02 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
6. To install, "X" is the current release version
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
On Windows, execute:
|
2016-03-15 03:10:30 +08:00
|
|
|
HDF5-1.10."X"-win32.msi or HDF5-1.10."X"-win64.msi
|
2014-05-06 03:40:19 +08:00
|
|
|
By default this program will install the hdf5 library into the
|
2015-08-28 05:46:50 +08:00
|
|
|
"C:\Program Files" directory and will create the following
|
2014-05-06 03:40:19 +08:00
|
|
|
directory structure:
|
|
|
|
HDF_Group
|
|
|
|
--HDF5
|
2016-03-15 03:10:30 +08:00
|
|
|
----1.10."X"
|
2014-05-06 03:40:19 +08:00
|
|
|
------bin
|
|
|
|
------include
|
|
|
|
------lib
|
|
|
|
------cmake
|
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
On Linux, change to the install destination directory
|
2014-05-06 03:40:19 +08:00
|
|
|
(create it if doesn't exist) and execute:
|
2016-03-15 03:10:30 +08:00
|
|
|
<path-to>/myhdfstuff/HDF5-1.10."X"-Linux.sh
|
2014-05-06 03:40:19 +08:00
|
|
|
After accepting the license, the script will prompt:
|
|
|
|
By default the HDF5 will be installed in:
|
2016-03-15 03:10:30 +08:00
|
|
|
"<current directory>/HDF5-1.10."X"-Linux"
|
|
|
|
Do you want to include the subdirectory HDF5-1.10."X"-Linux?
|
2015-08-28 05:46:50 +08:00
|
|
|
Saying no will install in: "<current directory>" [Yn]:
|
2014-05-06 03:40:19 +08:00
|
|
|
Note that the script will create the following directory structure
|
|
|
|
relative to the install point:
|
|
|
|
HDF_Group
|
|
|
|
--HDF5
|
2016-03-15 03:10:30 +08:00
|
|
|
----1.10."X"
|
2014-05-06 03:40:19 +08:00
|
|
|
------bin
|
|
|
|
------include
|
|
|
|
------lib
|
|
|
|
------share
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2016-03-15 03:10:30 +08:00
|
|
|
On Mac you will find HDF5-1.10."X"-Darwin.dmg in the myhdfstuff folder. Click
|
2014-05-06 03:40:19 +08:00
|
|
|
on the dmg file to proceed with installation. After accepting the license,
|
2015-08-28 05:46:50 +08:00
|
|
|
there will be a folder with the following structure:
|
2014-05-06 03:40:19 +08:00
|
|
|
HDF_Group
|
|
|
|
--HDF5
|
2016-03-15 03:10:30 +08:00
|
|
|
----1.10."X"
|
2014-05-06 03:40:19 +08:00
|
|
|
------bin
|
|
|
|
------include
|
|
|
|
------lib
|
|
|
|
------share
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
By default the installation will create the bin, include, lib and cmake
|
2016-03-15 03:10:30 +08:00
|
|
|
folders in the <install destination directory>/HDF_Group/HDF5/1.10."X"
|
2014-02-01 02:15:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
========================================================================
|
2014-05-06 03:40:19 +08:00
|
|
|
III. Quick Step Building HDF5 C Static Libraries and Tools with CMake
|
2013-04-29 22:18:34 +08:00
|
|
|
========================================================================
|
2015-08-28 05:46:50 +08:00
|
|
|
Notes: This short set of instructions is written for users who want to
|
|
|
|
quickly build the just the HDF5 C static library and tools from
|
2014-05-06 03:40:19 +08:00
|
|
|
the HDF5 source code package using the CMake command line tools.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
Go through these steps:
|
2013-04-29 22:18:34 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
1. Change to the development directory "myhdfstuff".
|
2013-04-29 22:18:34 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
2. Uncompress the HDF5 source file
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
3. Create a folder "build" in the "myhdfstuff" directory.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
4. Change into the "build" folder.
|
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
5. Configure the C library, tools and tests with one of the following commands:
|
2013-04-29 22:18:34 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
On Windows 32 bit
|
2016-03-15 03:10:30 +08:00
|
|
|
cmake -G "Visual Studio 12 2013" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.10."X"
|
2010-05-27 00:47:12 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
On Windows 64 bit
|
2016-03-15 03:10:30 +08:00
|
|
|
cmake -G "Visual Studio 12 2013 Win64" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.10."X"
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
On Linux and Mac
|
2016-03-15 03:10:30 +08:00
|
|
|
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ../hdf5-1.10."X"
|
2014-05-06 03:40:19 +08:00
|
|
|
|
|
|
|
where "X" is the current release version.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
6. Build the C library, tools and tests with this command:
|
|
|
|
cmake --build . --config Release
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
7. Test the C library and tools with this command:
|
|
|
|
ctest . -C Release
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
8. Create an install image with this command:
|
|
|
|
cpack -C Release CPackConfig.cmake
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
9. To install
|
2014-05-06 03:40:19 +08:00
|
|
|
On Windows, execute:
|
2016-03-15 03:10:30 +08:00
|
|
|
HDF5-1.10."X"-win32.msi or HDF5-1.10."X"-win64.msi
|
2014-05-06 03:40:19 +08:00
|
|
|
By default this program will install the hdf5 library into the
|
2015-08-28 05:46:50 +08:00
|
|
|
"C:\Program Files" directory and will create the following
|
2014-05-06 03:40:19 +08:00
|
|
|
directory structure:
|
|
|
|
HDF_Group
|
|
|
|
--HDF5
|
2016-03-15 03:10:30 +08:00
|
|
|
----1.10."X"
|
2014-05-06 03:40:19 +08:00
|
|
|
------bin
|
|
|
|
------include
|
|
|
|
------lib
|
|
|
|
------cmake
|
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
On Linux, change to the install destination directory
|
2014-05-06 03:40:19 +08:00
|
|
|
(create if doesn't exist) and execute:
|
2016-03-15 03:10:30 +08:00
|
|
|
<path-to>/myhdfstuff/build/HDF5-1.10."X"-Linux.sh
|
2014-05-06 03:40:19 +08:00
|
|
|
After accepting the license, the script will prompt:
|
|
|
|
By default the HDF5 will be installed in:
|
2016-03-15 03:10:30 +08:00
|
|
|
"<current directory>/HDF5-1.10."X"-Linux"
|
|
|
|
Do you want to include the subdirectory HDF5-1.10."X"-Linux?
|
2015-08-28 05:46:50 +08:00
|
|
|
Saying no will install in: "<current directory>" [Yn]:
|
2014-05-06 03:40:19 +08:00
|
|
|
Note that the script will create the following directory structure
|
|
|
|
relative to the install point:
|
|
|
|
HDF_Group
|
|
|
|
--HDF5
|
2016-03-15 03:10:30 +08:00
|
|
|
----1.10."X"
|
2014-05-06 03:40:19 +08:00
|
|
|
------bin
|
|
|
|
------include
|
|
|
|
------lib
|
|
|
|
------share
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2016-03-15 03:10:30 +08:00
|
|
|
On Mac you will find HDF5-1.10."X"-Darwin.dmg in the build folder. Click
|
2014-05-06 03:40:19 +08:00
|
|
|
on the dmg file to proceed with installation. After accepting the license,
|
2015-08-28 05:46:50 +08:00
|
|
|
there will be a folder with the following structure:
|
2014-05-06 03:40:19 +08:00
|
|
|
HDF_Group
|
|
|
|
--HDF5
|
2016-03-15 03:10:30 +08:00
|
|
|
----1.10."X"
|
2014-05-06 03:40:19 +08:00
|
|
|
------bin
|
|
|
|
------include
|
|
|
|
------lib
|
|
|
|
------share
|
2013-04-29 22:18:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
========================================================================
|
2015-08-28 05:46:50 +08:00
|
|
|
IV. Further considerations
|
2010-05-27 00:47:12 +08:00
|
|
|
========================================================================
|
|
|
|
|
|
|
|
1. We suggest you obtain the latest CMake for windows from the Kitware
|
2016-03-15 03:10:30 +08:00
|
|
|
web site. The HDF5 1.10."X" product requires a minimum CMake version 3.1.0.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2013-04-29 22:18:34 +08:00
|
|
|
2. If you plan to use Zlib or Szip:
|
2015-08-28 05:46:50 +08:00
|
|
|
A. Download the binary packages and install them in a central location.
|
|
|
|
For example on Windows, create a folder extlibs and install the
|
2014-04-29 05:40:17 +08:00
|
|
|
packages there. Add the following CMake options:
|
2014-05-06 03:40:19 +08:00
|
|
|
-DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib
|
|
|
|
-DZLIB_INCLUDE_DIR:PATH=some_location/include
|
|
|
|
-DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib
|
|
|
|
-DSZIP_INCLUDE_DIR:PATH=some_location/include
|
2015-08-28 05:46:50 +08:00
|
|
|
where "some_location" is the full path to the extlibs folder.
|
2014-04-29 05:40:17 +08:00
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
B. Use source packages from an SVN server by adding the following CMake
|
2011-01-26 04:40:41 +08:00
|
|
|
options:
|
|
|
|
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="SVN"
|
|
|
|
ZLIB_SVN_URL:STRING="http://some_location/zlib/trunk"
|
|
|
|
SZIP_SVN_URL:STRING="http://some_location/szip/trunk"
|
2014-03-18 06:12:46 +08:00
|
|
|
where "some_location" is the URL to the SVN repository. Also set
|
|
|
|
CMAKE_BUILD_TYPE to the configuration type.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
C. Use source packages from a compressed file by adding the following
|
2013-04-29 22:18:34 +08:00
|
|
|
CMake options:
|
2011-01-26 04:40:41 +08:00
|
|
|
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
|
2011-01-26 05:17:54 +08:00
|
|
|
ZLIB_TGZ_NAME:STRING="zlib_src.ext"
|
|
|
|
SZIP_TGZ_NAME:STRING="szip_src.ext"
|
2013-09-13 02:12:34 +08:00
|
|
|
TGZPATH:STRING="some_location"
|
2015-08-28 05:46:50 +08:00
|
|
|
where "some_location" is the URL or full path to the compressed
|
2014-03-18 06:12:46 +08:00
|
|
|
file and ext is the type of compression file. Also set CMAKE_BUILD_TYPE
|
|
|
|
to the configuration type during configuration
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
3. If you are building on Apple Darwin platforms, you should add the
|
2013-04-29 22:18:34 +08:00
|
|
|
following options:
|
2014-05-06 03:40:19 +08:00
|
|
|
Compiler choice - use xcode by setting the ENV variables of CC and CXX
|
|
|
|
Shared fortran is not supported, build static:
|
2013-01-15 02:35:30 +08:00
|
|
|
BUILD_SHARED_LIBS:BOOL=OFF
|
2014-05-06 03:40:19 +08:00
|
|
|
Additional options:
|
2013-01-15 02:35:30 +08:00
|
|
|
CMAKE_ANSI_CFLAGS:STRING=-fPIC
|
|
|
|
CTEST_USE_LAUNCHERS:BOOL=ON
|
2015-08-28 05:46:50 +08:00
|
|
|
CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
|
|
|
|
|
2015-05-04 23:14:37 +08:00
|
|
|
4. Windows developers should install NSIS or WiX to create an install image with CPack.
|
2013-04-29 22:18:34 +08:00
|
|
|
Visual Studio Express users will not be able to package HDF5 into
|
|
|
|
an install image executable.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-02-01 02:15:02 +08:00
|
|
|
5. Developers can copy the config/cmake/cacheinit.cmake file and alter the
|
2013-10-03 03:46:32 +08:00
|
|
|
the settings for the developers' environment. Then the only options needed
|
|
|
|
on the command line are those options that are different. Example using HDF
|
|
|
|
default cache file:
|
2015-10-07 02:48:50 +08:00
|
|
|
cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 12 2013" \
|
2014-03-18 06:12:46 +08:00
|
|
|
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
|
|
|
|
-DCMAKE_BUILD_TYPE:STRING=Release ..
|
2013-04-29 22:18:34 +08:00
|
|
|
|
2014-01-25 04:06:35 +08:00
|
|
|
Notes: CMake and HDF5
|
2013-04-29 22:18:34 +08:00
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
1. Using CMake for building and using HDF5 is under active development.
|
|
|
|
While we have attempted to provide error-free files, please
|
|
|
|
understand that development with CMake has not been extensively
|
2014-01-25 04:06:35 +08:00
|
|
|
tested outside of HDF. The CMake specific files may change
|
|
|
|
before the next release.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
2. CMake support for HDF5 development should be usable on any
|
|
|
|
system where CMake is supported. Please send us any comments on
|
|
|
|
how CMake support can be improved on any system. Visit the
|
2014-01-25 04:06:35 +08:00
|
|
|
KitWare site for more information about CMake.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-10-28 02:30:50 +08:00
|
|
|
3. Build and test results can be submitted to our CDash server,
|
|
|
|
please read the HDF and CDash document at:
|
2015-08-28 05:46:50 +08:00
|
|
|
www.hdfgroup.org/CDash/HowToSubmit.
|
|
|
|
|
2014-01-25 04:06:35 +08:00
|
|
|
4. See the appendix at the bottom of this file for examples of using
|
|
|
|
a ctest script for building and testing. Using a ctest script is
|
|
|
|
preferred because of its flexibility.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-01-25 04:06:35 +08:00
|
|
|
Notes: CMake in General
|
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
1. More information about using CMake can be found at the KitWare site at
|
2014-05-06 03:40:19 +08:00
|
|
|
www.cmake.org.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
2. CMake uses the command line; however, the visual CMake tool is
|
2014-01-25 04:06:35 +08:00
|
|
|
available for the configuration step. The steps are similar for
|
|
|
|
all the operating systems supported by CMake.
|
2013-04-29 22:18:34 +08:00
|
|
|
|
|
|
|
|
2010-05-27 00:47:12 +08:00
|
|
|
========================================================================
|
2014-05-06 03:40:19 +08:00
|
|
|
V. Options for Building HDF5 Libraries with the CMake Command Line
|
2013-04-29 22:18:34 +08:00
|
|
|
========================================================================
|
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
To build the HDF5 Libraries with CMake, go through these five steps:
|
2013-04-29 22:18:34 +08:00
|
|
|
|
|
|
|
1. Run CMake
|
|
|
|
2. Configure the cache settings
|
|
|
|
3. Build HDF5
|
|
|
|
4. Test HDF5
|
2014-05-06 03:40:19 +08:00
|
|
|
5. Package HDF5 (create install image)
|
2013-04-29 22:18:34 +08:00
|
|
|
|
|
|
|
These five steps are described in detail below.
|
|
|
|
|
2010-05-27 00:47:12 +08:00
|
|
|
========================================================================
|
|
|
|
|
|
|
|
1. Run CMake
|
|
|
|
|
2013-10-03 03:46:32 +08:00
|
|
|
The visual CMake executable is named "cmake-gui.exe" on Windows and should be
|
2010-05-27 00:47:12 +08:00
|
|
|
available in your Start menu. For Linux, UNIX, and Mac users the
|
2015-08-28 05:46:50 +08:00
|
|
|
executable is named "cmake-gui" and can be found where CMake was
|
|
|
|
installed.
|
|
|
|
|
|
|
|
Specify the source and build directories.
|
|
|
|
|
2013-04-29 22:18:34 +08:00
|
|
|
***** Make the build and source directories different. ******
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
For example on Windows, if the source is at c:\MyHDFstuff\hdf5,
|
|
|
|
then use c:\MyHDFstuff\hdf5\build or c:\MyHDFstuff\build\hdf5 as the
|
2013-04-29 22:18:34 +08:00
|
|
|
build directory.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2014-02-01 02:15:02 +08:00
|
|
|
RECOMMENDED:
|
2015-08-28 05:46:50 +08:00
|
|
|
Users can perform the configuration step without using the visual
|
|
|
|
cmake-gui program. We use the file cacheinit.cmake in the
|
|
|
|
config/cmake source folder for our testing. This file enables all of the
|
|
|
|
basic options and we turn specific options on or off for testing
|
2013-04-29 22:18:34 +08:00
|
|
|
using the following command line within the build directory:
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2010-09-21 01:27:29 +08:00
|
|
|
cmake -C <sourcepath>/config/cmake/cacheinit.cmake -G "<generator>" [-D<options>] <sourcepath>
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
Where <generator> is
|
2010-09-21 01:27:29 +08:00
|
|
|
* MinGW Makefiles
|
|
|
|
* NMake Makefiles
|
|
|
|
* Unix Makefiles
|
2015-05-04 23:14:37 +08:00
|
|
|
* Visual Studio 12 2013
|
|
|
|
* Visual Studio 12 2013 Win64
|
|
|
|
* Visual Studio 11 2012
|
|
|
|
* Visual Studio 11 2012 Win64
|
2016-03-15 03:10:30 +08:00
|
|
|
* Visual Studio 14 2015
|
|
|
|
* Visual Studio 14 2015 Win64
|
2010-09-21 01:27:29 +08:00
|
|
|
|
|
|
|
<options> is:
|
|
|
|
* SZIP_INCLUDE_DIR:PATH=<path to szip includes directory>
|
|
|
|
* SZIP_LIBRARY:FILEPATH=<path to szip/library file>
|
2011-08-26 23:38:35 +08:00
|
|
|
* ZLIB_INCLUDE_DIR:PATH=<path to zlib includes directory>
|
|
|
|
* ZLIB_LIBRARY:FILEPATH=<path to zlib/library file>
|
2010-09-21 01:27:29 +08:00
|
|
|
* <HDF5OPTION>:BOOL=[ON | OFF]
|
|
|
|
|
|
|
|
<cacheinit.cmake> is:
|
2013-04-29 22:18:34 +08:00
|
|
|
# This is the CMakeCache file used by HDF Group for daily tests.
|
2013-03-07 02:40:47 +08:00
|
|
|
########################
|
|
|
|
# EXTERNAL cache entries
|
|
|
|
########################
|
2015-10-07 02:48:50 +08:00
|
|
|
set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE)
|
2014-03-12 05:14:57 +08:00
|
|
|
set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
|
|
|
|
set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
|
|
|
|
set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
|
|
|
|
set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
|
|
|
|
set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
|
|
|
|
set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
|
|
|
|
set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
|
|
|
|
set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
|
|
|
|
set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
|
|
|
|
set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
|
|
|
|
set (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
|
|
|
|
set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
|
|
|
|
set (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
|
|
|
|
set (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
|
|
|
|
set (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory checker is used" FORCE)
|
2016-01-04 06:06:52 +08:00
|
|
|
set (HDF5_MEMORY_ALLOC_SANITY_CHECK OFF CACHE BOOL "Indicate that internal memory allocation sanity checks are enabled" FORCE)
|
2014-03-12 05:14:57 +08:00
|
|
|
set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
|
|
|
|
set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
|
|
|
|
set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
|
|
|
|
set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
|
2015-10-07 02:48:50 +08:00
|
|
|
set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE)
|
2014-03-12 05:14:57 +08:00
|
|
|
set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
|
|
|
|
set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
|
2014-06-05 05:22:31 +08:00
|
|
|
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
|
|
|
|
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
|
2014-03-12 05:14:57 +08:00
|
|
|
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
|
|
|
|
set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
|
|
|
|
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
|
|
|
|
set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
|
2010-05-27 00:47:12 +08:00
|
|
|
|
|
|
|
2. Configure the cache settings
|
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
2.1 Visual CMake users, click the Configure button. If this is the first time you are
|
|
|
|
running cmake-gui in this directory, you will be prompted for the
|
|
|
|
generator you wish to use (for example on Windows, Visual Studio 11).
|
|
|
|
CMake will read in the CMakeLists.txt files from the source directory and
|
|
|
|
display options for the HDF5 project. After the first configure you
|
2013-04-29 22:18:34 +08:00
|
|
|
can adjust the cache settings and/or specify the locations of other programs.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2010-09-21 01:27:29 +08:00
|
|
|
Any conflicts or new values will be highlighted by the configure
|
2015-08-28 05:46:50 +08:00
|
|
|
process in red. Once you are happy with all the settings and there are no
|
|
|
|
more values in red, click the Generate button to produce the appropriate
|
|
|
|
build files.
|
|
|
|
|
|
|
|
On Windows, if you are using a Visual Studio generator, the solution and
|
2010-09-21 01:27:29 +08:00
|
|
|
project files will be created in the build folder.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2010-09-21 01:27:29 +08:00
|
|
|
On linux, if you are using the Unix Makefiles generator, the Makefiles will
|
|
|
|
be created in the build folder.
|
|
|
|
|
2013-10-03 03:46:32 +08:00
|
|
|
2.2 Preferred command line example on Windows in c:\MyHDFstuff\hdf5\build directory:
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2015-10-07 02:48:50 +08:00
|
|
|
cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 12 2013" \
|
2014-03-18 06:12:46 +08:00
|
|
|
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
|
|
|
|
-DCMAKE_BUILD_TYPE:STRING=Release ..
|
2010-05-27 00:47:12 +08:00
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
2.3 On Windows, if you are using a Visual Studio Express version you must
|
2013-04-29 22:18:34 +08:00
|
|
|
be sure that the following two options are correctly set/unset:
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2011-10-26 00:52:58 +08:00
|
|
|
HDF5_NO_PACKAGES:BOOL=ON
|
|
|
|
HDF5_USE_FOLDERS:BOOL=OFF
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2010-05-27 00:47:12 +08:00
|
|
|
3. Build HDF5
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
On Windows, you can build HDF5 using either the Visual Studio Environment
|
2013-10-03 03:46:32 +08:00
|
|
|
or the command line. The command line can be used on all platforms;
|
|
|
|
Windows, linux, Unix, and Mac.
|
2010-05-27 00:47:12 +08:00
|
|
|
|
|
|
|
To build from the command line, navigate to your build directory and
|
2013-04-29 22:18:34 +08:00
|
|
|
execute the following:
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
cmake --build . --config {Debug | Release}
|
|
|
|
|
2010-05-27 00:47:12 +08:00
|
|
|
NOTE: "--config {Debug | Release}" may be optional on your platform. We
|
2015-08-28 05:46:50 +08:00
|
|
|
recommend choosing either Debug or Release on Windows.
|
|
|
|
|
|
|
|
3.1 If you wish to use the Visual Studio environment, open the solution
|
|
|
|
file in your build directory. Be sure to select either Debug or
|
2010-05-27 00:47:12 +08:00
|
|
|
Release and build the solution.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2011-01-26 22:09:45 +08:00
|
|
|
3.2.1 The external libraries (zlib and szip) can be configured
|
2013-04-29 22:18:34 +08:00
|
|
|
to allow building the libraries by downloading from an SVN repository.
|
2010-10-15 05:58:35 +08:00
|
|
|
The option is 'HDF5_ALLOW_EXTERNAL_SUPPORT'; by adding the following
|
|
|
|
configuration option:
|
|
|
|
-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="SVN"
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2013-04-29 22:18:34 +08:00
|
|
|
The options to control the SVN URL (config/cmake/cacheinit.cmake file) are:
|
2014-10-28 02:30:50 +08:00
|
|
|
ZLIB_SVN_URL:STRING="http://${svn_url}/zlib/trunk"
|
|
|
|
SZIP_SVN_URL:STRING="http://${svn_url}/szip/trunk"
|
|
|
|
${svn_url} should be changed to your location. Also define CMAKE_BUILD_TYPE
|
2014-03-18 06:12:46 +08:00
|
|
|
to be the configuration type.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2011-01-26 22:09:45 +08:00
|
|
|
3.2.2 Or the external libraries (zlib and szip) can be configured
|
2011-01-26 04:40:41 +08:00
|
|
|
to allow building the libraries by using a compressed file.
|
2015-08-28 05:46:50 +08:00
|
|
|
The option is 'HDF5_ALLOW_EXTERNAL_SUPPORT' and is enabled by
|
2013-04-29 22:18:34 +08:00
|
|
|
adding the following configuration option:
|
2011-01-26 04:40:41 +08:00
|
|
|
-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
The options to control the SVN URL (config/cmake/cacheinit.cmake
|
2013-04-29 22:18:34 +08:00
|
|
|
file) are:
|
2011-01-26 05:17:54 +08:00
|
|
|
ZLIB_TGZ_NAME:STRING="zlib_src.ext"
|
|
|
|
SZIP_TGZ_NAME:STRING="szip_src.ext"
|
2013-09-13 02:12:34 +08:00
|
|
|
TGZPATH:STRING="some_location"
|
2015-08-28 05:46:50 +08:00
|
|
|
where "some_location/xxxx_src.ext" is the URL or full path to
|
|
|
|
the compressed file and where ext is the type of the compression
|
2014-03-18 06:12:46 +08:00
|
|
|
file such as .bz2, .tar, .tar.gz, .tgz, or .zip. Also define
|
|
|
|
CMAKE_BUILD_TYPE to be the configuration type.
|
2010-05-27 00:47:12 +08:00
|
|
|
|
2013-04-29 22:18:34 +08:00
|
|
|
4. Test HDF5
|
2010-05-27 00:47:12 +08:00
|
|
|
|
2013-04-29 22:18:34 +08:00
|
|
|
To test the build, navigate to your build directory and execute:
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2010-05-27 00:47:12 +08:00
|
|
|
ctest . -C {Debug | Release}
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2010-05-27 00:47:12 +08:00
|
|
|
NOTE: "-C {Debug | Release}" may be optional on your platform. We
|
|
|
|
recommend choosing either Debug or Release to match the build
|
2015-08-28 05:46:50 +08:00
|
|
|
step on Windows.
|
2010-09-21 01:27:29 +08:00
|
|
|
|
2013-04-29 22:18:34 +08:00
|
|
|
5. Packaging HDF5 (create an install image)
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2015-04-23 23:41:22 +08:00
|
|
|
To package the build into a simple installer using WiX toolset or the NullSoft installer NSIS
|
2010-09-21 01:27:29 +08:00
|
|
|
on Windows, or into compressed files (.tar.gz, .sh, .zip), use the CPack tool.
|
|
|
|
|
2011-01-26 04:40:41 +08:00
|
|
|
To package the build, navigate to your build directory and execute;
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2010-09-21 05:00:36 +08:00
|
|
|
cpack -C {Debug | Release} CPackConfig.cmake
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2013-04-29 22:18:34 +08:00
|
|
|
NOTE: See note 8 of this document for NSIS information.
|
2015-04-23 23:41:22 +08:00
|
|
|
See note 9 of this document for WiX information.
|
2015-08-28 05:46:50 +08:00
|
|
|
Also, if you are using a Visual Studio Express version or do not
|
|
|
|
want to enable the packaging components, set HDF5_NO_PACKAGES
|
2013-04-29 22:18:34 +08:00
|
|
|
to ON (on the command line add -DHDF5_NO_PACKAGES:BOOL=ON)
|
2015-08-28 05:46:50 +08:00
|
|
|
|
|
|
|
6. The files that support building HDF5 with CMake are all the files in the
|
|
|
|
config/cmake folder, the CMakeLists.txt files in each source folder, and
|
|
|
|
CTestConfig.cmake. CTestConfig.cmake is specific to the internal testing
|
|
|
|
performed by The HDF Group. It should be altered for the user's
|
2013-04-29 22:18:34 +08:00
|
|
|
installation and needs. The cacheinit.cmake file settings are used by
|
2015-08-28 05:46:50 +08:00
|
|
|
The HDF Group for daily testing. It should be altered/ignored for the user's
|
2010-09-21 01:27:29 +08:00
|
|
|
installation and needs.
|
2010-05-27 00:47:12 +08:00
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
7. More information about using CMake can be found at the KitWare site,
|
2014-05-06 03:40:19 +08:00
|
|
|
www.cmake.org.
|
2015-08-28 05:46:50 +08:00
|
|
|
|
2011-08-25 23:08:29 +08:00
|
|
|
8. Nullsoft Scriptable Install System
|
2015-08-28 05:46:50 +08:00
|
|
|
The Nullsoft Scriptable Install System (NSIS) is an open source installation
|
|
|
|
system. It was created by the WinAmp authors to distribute that application,
|
|
|
|
but it is now a general-purpose system which anyone might use. NSIS installers
|
|
|
|
recognize /S for silent installation and /D=dir to specify the
|
|
|
|
"output directory", which is where the program will be installed. These
|
|
|
|
options are case-sensitive, so be sure to type them in upper case.
|
2011-08-25 23:08:29 +08:00
|
|
|
|
2015-04-23 23:41:22 +08:00
|
|
|
9. WiX Toolset
|
2015-08-28 05:46:50 +08:00
|
|
|
WiX--the Windows Installer XML toolset--lets developers create installers for
|
2015-04-23 23:41:22 +08:00
|
|
|
Windows Installer, the Windows installation engine. See http://wixtoolset.org.
|
2013-04-29 22:18:34 +08:00
|
|
|
|
|
|
|
|
2011-10-01 02:19:54 +08:00
|
|
|
========================================================================
|
2014-05-06 03:40:19 +08:00
|
|
|
VI. CMake Option Defaults for HDF5
|
2011-10-01 02:19:54 +08:00
|
|
|
========================================================================
|
2013-04-29 22:18:34 +08:00
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
In the options listed below, there are three columns of information:
|
|
|
|
Option Name, Option Description, and Option Default.
|
|
|
|
The config/cmake/cacheinit.cmake file can override the following values.
|
2013-04-29 22:18:34 +08:00
|
|
|
|
2012-07-20 03:53:17 +08:00
|
|
|
---------------- General Build Options ---------------------
|
2015-08-28 05:46:50 +08:00
|
|
|
BUILD_SHARED_LIBS "Build Shared Libraries" ON
|
2012-07-20 03:53:17 +08:00
|
|
|
BUILD_STATIC_EXECS "Build Static Executabless" OFF
|
2015-08-28 05:46:50 +08:00
|
|
|
BUILD_TESTING "Build HDF5 Unit Testing" ON
|
2012-07-20 03:53:17 +08:00
|
|
|
|
|
|
|
---------------- HDF5 Build Options ---------------------
|
2015-03-31 00:54:46 +08:00
|
|
|
HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" ON
|
|
|
|
HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF
|
2016-03-15 03:10:30 +08:00
|
|
|
HDF5_BUILD_JAVA "Build JAVA support" OFF
|
2015-03-31 00:54:46 +08:00
|
|
|
HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" ON
|
|
|
|
HDF5_BUILD_TOOLS "Build HDF5 Tools" ON
|
2012-07-20 03:53:17 +08:00
|
|
|
|
|
|
|
---------------- HDF5 Advanced Options ---------------------
|
2016-03-15 03:10:30 +08:00
|
|
|
ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF
|
2016-03-15 03:10:30 +08:00
|
|
|
HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF
|
|
|
|
HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF
|
2016-03-15 03:10:30 +08:00
|
|
|
HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" ON
|
2016-03-15 03:10:30 +08:00
|
|
|
HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" OFF
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON
|
|
|
|
HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON
|
|
|
|
HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON
|
|
|
|
HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF
|
|
|
|
HDF5_ENABLE_TRACE "Enable API tracing capability" OFF
|
|
|
|
HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF
|
2016-03-15 03:10:30 +08:00
|
|
|
HDF5_GENERATE_HEADERS "Rebuild Generated Files" OFF
|
|
|
|
HDF5_JAVA_PACK_JRE "Package a JRE installer directory" OFF
|
2016-01-04 06:06:52 +08:00
|
|
|
HDF5_MEMORY_ALLOC_SANITY_CHECK "Indicate that internal memory allocation sanity checks are enabled" OFF
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF
|
|
|
|
HDF5_NO_PACKAGES "Do not include CPack Packaging" OFF
|
2016-03-15 03:10:30 +08:00
|
|
|
HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF
|
|
|
|
HDF5_PACK_MACOSX_FRAMEWORK "Package the HDF5 Library in a Frameworks" OFF
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF
|
|
|
|
HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF
|
2016-03-15 03:10:30 +08:00
|
|
|
HDF_TEST_EXPRESS "Control testing framework (0-3)" "0"
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_TEST_VFD "Execute tests with different VFDs" OFF
|
|
|
|
HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF
|
2016-03-15 03:10:30 +08:00
|
|
|
HDF5_USE_18_API_DEFAULT "Use the HDF5 1.8.x API by default" OFF
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF
|
2015-10-07 02:48:50 +08:00
|
|
|
HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON
|
|
|
|
HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF
|
2016-03-15 03:10:30 +08:00
|
|
|
SKIP_HDF5_FORTRAN_SHARED "Do not build the fortran shared libraries" OFF
|
2015-08-28 05:46:50 +08:00
|
|
|
if (APPLE)
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF
|
2015-08-28 05:46:50 +08:00
|
|
|
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_ENABLE_TRACE "Enable API tracing capability" ON
|
2015-08-28 05:46:50 +08:00
|
|
|
if (HDF5_TEST_VFD)
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON
|
2012-07-20 03:53:17 +08:00
|
|
|
|
|
|
|
---------------- External Library Options ---------------------
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building" "NO"
|
|
|
|
HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF
|
|
|
|
HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF
|
|
|
|
ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0
|
|
|
|
SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0
|
2015-08-28 05:46:50 +08:00
|
|
|
if (HDF5_ENABLE_SZIP_SUPPORT)
|
2013-04-29 22:18:34 +08:00
|
|
|
HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF
|
2014-03-12 05:14:57 +08:00
|
|
|
if (WINDOWS)
|
2013-09-20 00:38:08 +08:00
|
|
|
H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin"
|
2014-03-12 05:14:57 +08:00
|
|
|
else (WINDOWS)
|
2013-09-20 00:38:08 +08:00
|
|
|
H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin"
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (WINDOWS)
|
2010-05-27 00:47:12 +08:00
|
|
|
|
|
|
|
|
2013-04-29 22:18:34 +08:00
|
|
|
|
|
|
|
========================================================================
|
2014-05-06 03:40:19 +08:00
|
|
|
VII. User Defined Options for HDF5 Libraries with CMake
|
2013-09-20 00:38:08 +08:00
|
|
|
========================================================================
|
|
|
|
|
|
|
|
Support for User Defined macros and options has been added. The file
|
|
|
|
UserMacros.cmake has an example of the technique. In the folder,
|
|
|
|
config/cmake/UserMacros, is an implementation for Windows Visual Studio
|
2015-08-28 05:46:50 +08:00
|
|
|
users for linking libraries to the static CRT - Windows_MT.cmake.
|
2013-09-20 00:38:08 +08:00
|
|
|
|
2015-08-28 05:46:50 +08:00
|
|
|
Copy the contents of the file, both macro and option, into the
|
2013-09-20 00:38:08 +08:00
|
|
|
UserMacros.cmake file. Then enable the option to the CMake configuration,
|
|
|
|
build and test process.
|
|
|
|
|
|
|
|
========================================================================
|
2014-05-06 03:40:19 +08:00
|
|
|
VIII. Options for Platform Configuration Files
|
2013-04-29 22:18:34 +08:00
|
|
|
========================================================================
|
2013-03-07 02:40:47 +08:00
|
|
|
|
2015-10-21 23:44:41 +08:00
|
|
|
Below is the HDF5config.cmake ctest script with extra comments.
|
2015-04-23 23:41:22 +08:00
|
|
|
Execute:
|
2015-10-21 23:44:41 +08:00
|
|
|
ctest -S HDF5config.cmake,BUILD_GENERATOR=xxx -C Release -V -O hdf5.log
|
2015-04-23 23:41:22 +08:00
|
|
|
The same scripts can be used on Linux, Mac OSX or a Windows machine by
|
|
|
|
adding an option (${CTEST_SCRIPT_ARG}) to the platform configuration script.
|
2013-04-29 22:18:34 +08:00
|
|
|
|
|
|
|
|
2015-10-21 23:44:41 +08:00
|
|
|
#############################################################################################
|
|
|
|
### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
|
|
|
|
### BUILD_GENERATOR required [Unix, VS2015, VS201564, VS2013, VS201364, VS2012, VS201264] ###
|
2016-03-15 03:10:30 +08:00
|
|
|
### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -V -O hdf5.log ###
|
2015-10-21 23:44:41 +08:00
|
|
|
#############################################################################################
|
2014-05-06 03:40:19 +08:00
|
|
|
|
2015-04-23 23:41:22 +08:00
|
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
2015-10-07 02:48:50 +08:00
|
|
|
############################################################################
|
|
|
|
# Usage:
|
2016-03-15 03:10:30 +08:00
|
|
|
# ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log
|
2015-10-07 02:48:50 +08:00
|
|
|
# where valid options for OPTION are:
|
|
|
|
# BUILD_GENERATOR - The cmake build generator:
|
|
|
|
# Unix * Unix Makefiles
|
2015-10-21 23:44:41 +08:00
|
|
|
# VS2015 * Visual Studio 14 2015
|
|
|
|
# VS201564 * Visual Studio 14 2015 Win64
|
2015-10-07 02:48:50 +08:00
|
|
|
# VS2013 * Visual Studio 12 2013
|
|
|
|
# VS201364 * Visual Studio 12 2013 Win64
|
|
|
|
# VS2012 * Visual Studio 11 2012
|
|
|
|
# VS201264 * Visual Studio 11 2012 Win64
|
|
|
|
#
|
|
|
|
# INSTALLDIR - root folder where hdf5 is installed
|
2016-08-23 01:22:38 +08:00
|
|
|
# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
|
2015-10-07 02:48:50 +08:00
|
|
|
# CTEST_SOURCE_NAME - source folder
|
2015-10-21 23:44:41 +08:00
|
|
|
# STATIC_LIBRARIES - Build/use static libraries
|
|
|
|
# FORTRAN_LIBRARIES - Build/use fortran libraries
|
2016-03-15 03:10:30 +08:00
|
|
|
# JAVA_LIBRARIES - Build/use java libraries
|
2015-10-07 02:48:50 +08:00
|
|
|
# NO_MAC_FORTRAN - Yes to be SHARED on a Mac
|
|
|
|
##############################################################################
|
|
|
|
|
2016-03-15 03:10:30 +08:00
|
|
|
set(CTEST_SOURCE_VERSION 1.10.0)
|
|
|
|
set(CTEST_SOURCE_VERSEXT "-pre1")
|
2015-10-07 02:48:50 +08:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# handle input parameters to script.
|
|
|
|
#BUILD_GENERATOR - which CMake generator to use, required
|
2016-03-15 03:10:30 +08:00
|
|
|
#INSTALLDIR - HDF5-1.10.0 root folder
|
2016-08-23 01:22:38 +08:00
|
|
|
#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
|
2016-03-15 03:10:30 +08:00
|
|
|
#CTEST_SOURCE_NAME - name of source folder; HDF5-1.10.0
|
2015-10-21 23:44:41 +08:00
|
|
|
#STATIC_LIBRARIES - Default is YES
|
|
|
|
#FORTRAN_LIBRARIES - Default is NO
|
2016-03-15 03:10:30 +08:00
|
|
|
#JAVA_LIBRARIES - Default is NO
|
2015-10-07 02:48:50 +08:00
|
|
|
#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac
|
|
|
|
if(DEFINED CTEST_SCRIPT_ARG)
|
|
|
|
# transform ctest script arguments of the form
|
|
|
|
# script.ctest,var1=value1,var2=value2
|
|
|
|
# to variables with the respective names set to the respective values
|
|
|
|
string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
|
|
|
|
foreach(current_var ${script_args})
|
|
|
|
if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
|
|
|
|
set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# build generator must be defined
|
|
|
|
if(NOT DEFINED BUILD_GENERATOR)
|
2015-10-22 00:29:33 +08:00
|
|
|
message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
|
2015-10-07 02:48:50 +08:00
|
|
|
else()
|
|
|
|
if(${BUILD_GENERATOR} STREQUAL "Unix")
|
2015-10-20 01:13:50 +08:00
|
|
|
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
|
2015-10-21 23:44:41 +08:00
|
|
|
elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
|
|
|
|
set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
|
|
|
|
elseif(${BUILD_GENERATOR} STREQUAL "VS201564")
|
|
|
|
set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
|
2015-10-07 02:48:50 +08:00
|
|
|
elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
|
2015-10-20 01:13:50 +08:00
|
|
|
set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
|
2015-10-07 02:48:50 +08:00
|
|
|
elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
|
2015-10-20 01:13:50 +08:00
|
|
|
set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
|
2015-10-07 02:48:50 +08:00
|
|
|
elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
|
2015-10-20 01:13:50 +08:00
|
|
|
set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
|
2015-10-07 02:48:50 +08:00
|
|
|
elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
|
2015-10-20 01:13:50 +08:00
|
|
|
set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
|
2015-10-07 02:48:50 +08:00
|
|
|
else()
|
2015-10-22 00:29:33 +08:00
|
|
|
message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
|
2015-10-07 02:48:50 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT DEFINED INSTALLDIR)
|
2016-03-15 03:10:30 +08:00
|
|
|
if(WIN32)
|
2015-10-07 02:48:50 +08:00
|
|
|
set(INSTALLDIR "C:\\Program\ Files\\myhdf5")
|
2016-03-15 03:10:30 +08:00
|
|
|
else()
|
|
|
|
set(INSTALLDIR "/usr/local/myhdf5")
|
2015-10-07 02:48:50 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
2016-08-23 01:22:38 +08:00
|
|
|
if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
|
|
|
|
set(CTEST_CONFIGURATION_TYPE "Release")
|
2015-10-07 02:48:50 +08:00
|
|
|
endif()
|
|
|
|
if(NOT DEFINED CTEST_SOURCE_NAME)
|
|
|
|
set(CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
|
|
|
|
endif()
|
2015-10-21 23:44:41 +08:00
|
|
|
if(NOT DEFINED STATIC_LIBRARIES)
|
2015-10-07 02:48:50 +08:00
|
|
|
set(STATICLIBRARIES "YES")
|
2016-03-15 03:10:30 +08:00
|
|
|
else()
|
|
|
|
set(STATICLIBRARIES "NO")
|
2015-10-07 02:48:50 +08:00
|
|
|
endif()
|
2015-10-21 23:44:41 +08:00
|
|
|
if(NOT DEFINED FORTRAN_LIBRARIES)
|
2015-10-07 02:48:50 +08:00
|
|
|
set(FORTRANLIBRARIES "NO")
|
2016-03-15 03:10:30 +08:00
|
|
|
else()
|
|
|
|
set(FORTRANLIBRARIES "YES")
|
|
|
|
endif()
|
|
|
|
if(NOT DEFINED JAVA_LIBRARIES)
|
|
|
|
set(JAVALIBRARIES "NO")
|
|
|
|
else()
|
|
|
|
set(JAVALIBRARIES "YES")
|
2015-10-07 02:48:50 +08:00
|
|
|
endif()
|
|
|
|
|
2015-04-23 23:41:22 +08:00
|
|
|
set(CTEST_BINARY_NAME "build")
|
2014-02-01 02:15:02 +08:00
|
|
|
set(CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
|
2015-04-23 23:41:22 +08:00
|
|
|
if(WIN32)
|
|
|
|
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
|
|
|
|
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
|
|
|
|
else()
|
|
|
|
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
|
|
|
|
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
|
|
|
|
endif()
|
2013-03-07 02:40:47 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
###################################################################
|
|
|
|
######### Following describes compiler ############
|
2015-04-23 23:41:22 +08:00
|
|
|
if(WIN32)
|
|
|
|
set(SITE_OS_NAME "Windows")
|
|
|
|
set(SITE_OS_VERSION "WIN7")
|
2016-03-15 03:10:30 +08:00
|
|
|
if(${BUILD_GENERATOR} STREQUAL "VS201564")
|
|
|
|
set(SITE_OS_BITS "64")
|
|
|
|
set(SITE_COMPILER_NAME "vs2015")
|
|
|
|
set(SITE_COMPILER_VERSION "14")
|
|
|
|
elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
|
|
|
|
set(SITE_OS_BITS "32")
|
|
|
|
set(SITE_COMPILER_NAME "vs2015")
|
|
|
|
set(SITE_COMPILER_VERSION "14")
|
|
|
|
elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
|
2015-04-23 23:41:22 +08:00
|
|
|
set(SITE_OS_BITS "64")
|
|
|
|
set(SITE_COMPILER_NAME "vs2013")
|
|
|
|
set(SITE_COMPILER_VERSION "12")
|
2015-10-07 02:48:50 +08:00
|
|
|
elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
|
2015-04-23 23:41:22 +08:00
|
|
|
set(SITE_OS_BITS "32")
|
|
|
|
set(SITE_COMPILER_NAME "vs2013")
|
|
|
|
set(SITE_COMPILER_VERSION "12")
|
2015-10-07 02:48:50 +08:00
|
|
|
elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
|
2015-04-23 23:41:22 +08:00
|
|
|
set(SITE_OS_BITS "64")
|
|
|
|
set(SITE_COMPILER_NAME "vs2012")
|
|
|
|
set(SITE_COMPILER_VERSION "11")
|
2015-10-07 02:48:50 +08:00
|
|
|
elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
|
2015-04-23 23:41:22 +08:00
|
|
|
set(SITE_OS_BITS "32")
|
|
|
|
set(SITE_COMPILER_NAME "vs2012")
|
|
|
|
set(SITE_COMPILER_VERSION "11")
|
|
|
|
endif()
|
|
|
|
## Set the following to unique id your computer ##
|
2015-10-07 02:48:50 +08:00
|
|
|
set(CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
|
2015-04-23 23:41:22 +08:00
|
|
|
else()
|
|
|
|
## Set the following to unique id your computer ##
|
|
|
|
if(APPLE)
|
|
|
|
set(CTEST_SITE "MAC.XXXX")
|
|
|
|
else()
|
|
|
|
set(CTEST_SITE "LINUX.XXXX")
|
|
|
|
endif()
|
|
|
|
endif()
|
2014-05-06 03:40:19 +08:00
|
|
|
###################################################################
|
|
|
|
|
|
|
|
###################################################################
|
|
|
|
######### Following is for submission to CDash ############
|
|
|
|
###################################################################
|
|
|
|
set(MODEL "Experimental")
|
2015-04-23 23:41:22 +08:00
|
|
|
###################################################################
|
2014-02-01 02:15:02 +08:00
|
|
|
|
2015-04-23 23:41:22 +08:00
|
|
|
###################################################################
|
|
|
|
##### Following controls CDash submission #####
|
2014-02-01 02:15:02 +08:00
|
|
|
#set(LOCAL_SUBMIT "TRUE")
|
2015-04-23 23:41:22 +08:00
|
|
|
##### Following controls test process #####
|
2014-02-01 02:15:02 +08:00
|
|
|
#set(LOCAL_SKIP_TEST "TRUE")
|
|
|
|
#set(LOCAL_MEMCHECK_TEST "TRUE")
|
|
|
|
#set(LOCAL_COVERAGE_TEST "TRUE")
|
2015-04-23 23:41:22 +08:00
|
|
|
##### Following controls cpack command #####
|
2014-05-06 03:40:19 +08:00
|
|
|
#set(LOCAL_NO_PACKAGE "TRUE")
|
2015-04-23 23:41:22 +08:00
|
|
|
##### Following controls source update #####
|
2014-02-01 02:15:02 +08:00
|
|
|
#set(LOCAL_UPDATE "TRUE")
|
2015-10-07 02:48:50 +08:00
|
|
|
set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/trunk")
|
2015-04-23 23:41:22 +08:00
|
|
|
#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
|
2016-03-15 03:10:30 +08:00
|
|
|
#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
|
2014-05-06 03:40:19 +08:00
|
|
|
###################################################################
|
2014-02-01 02:15:02 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
###################################################################
|
2014-02-01 02:15:02 +08:00
|
|
|
#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
|
2014-05-06 03:40:19 +08:00
|
|
|
#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ")
|
|
|
|
|
2015-10-07 02:48:50 +08:00
|
|
|
###################################################################
|
2015-10-21 23:44:41 +08:00
|
|
|
if(${STATICLIBRARIES})
|
2015-10-07 02:48:50 +08:00
|
|
|
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
|
|
|
|
######### Following describes computer ############
|
|
|
|
## following is optional to describe build ##
|
|
|
|
set(SITE_BUILDNAME_SUFFIX "STATIC")
|
2015-10-21 23:44:41 +08:00
|
|
|
endif()
|
2015-10-07 02:48:50 +08:00
|
|
|
###################################################################
|
2014-05-06 03:40:19 +08:00
|
|
|
|
2015-10-07 02:48:50 +08:00
|
|
|
### uncomment/comment and change the following lines for other configuration options
|
2014-05-06 03:40:19 +08:00
|
|
|
|
|
|
|
#### ext libraries ####
|
|
|
|
### ext libs from tgz
|
|
|
|
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
|
2014-02-01 02:15:02 +08:00
|
|
|
### ext libs from svn
|
|
|
|
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=SVN")
|
2014-05-06 03:40:19 +08:00
|
|
|
### ext libs on system
|
|
|
|
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
|
|
|
|
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
|
2015-04-23 23:41:22 +08:00
|
|
|
### disable ext libs building
|
|
|
|
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
|
|
|
|
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
|
|
|
|
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
|
2014-05-06 03:40:19 +08:00
|
|
|
#### fortran ####
|
2015-10-21 23:44:41 +08:00
|
|
|
if(${FORTRANLIBRARIES})
|
|
|
|
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
|
|
|
|
else()
|
|
|
|
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
|
|
|
|
endif()
|
2016-03-15 03:10:30 +08:00
|
|
|
#### java ####
|
|
|
|
if(${JAVALIBRARIES})
|
|
|
|
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=ON")
|
|
|
|
else()
|
|
|
|
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=OFF")
|
|
|
|
endif()
|
2014-05-06 03:40:19 +08:00
|
|
|
|
2014-02-01 02:15:02 +08:00
|
|
|
### disable test program builds
|
|
|
|
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
|
2014-05-06 03:40:19 +08:00
|
|
|
|
2014-02-01 02:15:02 +08:00
|
|
|
### disable packaging
|
|
|
|
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
|
2015-04-23 23:41:22 +08:00
|
|
|
### Create install package with external libraries (szip, zlib, jpeg)
|
|
|
|
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
|
2014-05-06 03:40:19 +08:00
|
|
|
|
|
|
|
### change install prefix
|
2015-10-07 02:48:50 +08:00
|
|
|
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
|
2015-04-23 23:41:22 +08:00
|
|
|
|
2014-05-06 03:40:19 +08:00
|
|
|
###################################################################
|
2013-03-07 02:40:47 +08:00
|
|
|
|
2015-04-23 23:41:22 +08:00
|
|
|
if(WIN32)
|
|
|
|
include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
|
2015-10-20 02:24:20 +08:00
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.exe")
|
|
|
|
file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
|
2015-04-23 23:41:22 +08:00
|
|
|
endif()
|
2015-10-20 02:24:20 +08:00
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.msi")
|
|
|
|
file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
|
2015-04-23 23:41:22 +08:00
|
|
|
endif()
|
2015-10-20 02:24:20 +08:00
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.zip")
|
|
|
|
file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
|
2015-04-23 23:41:22 +08:00
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
|
|
|
|
if(APPLE)
|
2015-10-20 02:24:20 +08:00
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.dmg")
|
|
|
|
file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
|
2015-04-23 23:41:22 +08:00
|
|
|
endif()
|
2015-10-20 02:24:20 +08:00
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.tar.gz")
|
|
|
|
file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
|
2015-04-23 23:41:22 +08:00
|
|
|
endif()
|
2015-10-20 02:24:20 +08:00
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.sh")
|
|
|
|
file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
|
2015-04-23 23:41:22 +08:00
|
|
|
endif()
|
|
|
|
else()
|
2015-05-04 23:14:37 +08:00
|
|
|
if(CYGWIN)
|
2015-10-20 02:24:20 +08:00
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.sh")
|
|
|
|
file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
|
2015-05-04 23:14:37 +08:00
|
|
|
endif()
|
2015-10-20 02:24:20 +08:00
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.tar.gz")
|
|
|
|
file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
|
2015-05-04 23:14:37 +08:00
|
|
|
endif()
|
|
|
|
else()
|
2015-10-20 02:24:20 +08:00
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.sh")
|
|
|
|
file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
|
2015-05-04 23:14:37 +08:00
|
|
|
endif()
|
2015-10-20 02:24:20 +08:00
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.tar.gz")
|
|
|
|
file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
|
2015-05-04 23:14:37 +08:00
|
|
|
endif()
|
2015-04-23 23:41:22 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
2013-03-07 02:40:47 +08:00
|
|
|
|
2013-04-29 22:18:34 +08:00
|
|
|
|
|
|
|
========================================================================
|
|
|
|
For further assistance, send email to help@hdfgroup.org
|
|
|
|
========================================================================
|
|
|
|
|
|
|
|
|
2010-05-27 00:47:12 +08:00
|
|
|
|