************************************************************************ * Build and Test HDF Java Examples with CMake * ************************************************************************ Notes: This short instruction is written for users who want to quickly test the installation of HDF Java by using the CMake tools to build and test the HDF Java Examples. The following instructions will show the default usage and then present common changes for non-default installations. For more information, see the USING_HDFJAVA_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 HDF Java 3.x product requires a minimum CMake version of 3.1.0. 2. You have installed the HDF Java library built with CMake, by executing the HDF Install Utility (the *.msi file in the binary package for Windows or the *.sh on Linux). If you are using a Windows platform, you can obtain a pre-built Windows binary from The HDF Group's website at https://support.hdfgroup.org/products/java/release/download.html. See Section "III. Common changes to the HDFJAVA_Examples.cmake file", for the line to change the location. ======================================================================== II. Building HDF Java Examples with CMake ======================================================================== Files in the HDF Java install directory: HDFJNIExamples-0.1.1-Source folder HDFJAVA_Examples.cmake Default installation process: Create a directory to run the examples, i.e. \test_hdfjava. Copy HDFJNIExamples-0.1.1-Source folder to this directory. Copy HDFJAVA_Examples.cmake to this directory. Edit line 8 of the HDFJAVA_Examples.cmake file and change the INSTALLDIR to the HDF Java install location. Execute from this directory: ctest -S HDFJAVA_Examples.cmake,HDFJNIExamples-0.1.1-Source -C Release -O test.log The script will use the examples folder HDFJNIExamples-0.1.1-Source, and create a build directory inside the HDFJNIExamples-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 HDFJAVA_Examples.cmake file ======================================================================== Line 8: change the INSTALLDIR to a different HDF5 install location. Line 13: uncomment to use a compressed source file.