summaryrefslogtreecommitdiffstats
path: root/release_docs/USING_HDF5_CMake.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2016-03-14 19:10:30 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2016-03-14 19:10:30 (GMT)
commit708227a1f9460ffb3cbe0a075d8a6cb6327983af (patch)
tree7952982161709bb96e2ca2231dcfdbf22fd2ca2d /release_docs/USING_HDF5_CMake.txt
parent4ed758aa3da4c3ee72e5adb552b9db6ff0a3f326 (diff)
downloadhdf5-708227a1f9460ffb3cbe0a075d8a6cb6327983af.zip
hdf5-708227a1f9460ffb3cbe0a075d8a6cb6327983af.tar.gz
hdf5-708227a1f9460ffb3cbe0a075d8a6cb6327983af.tar.bz2
[svn-r29406] Add Java and update options to CMake/Windows docs
Diffstat (limited to 'release_docs/USING_HDF5_CMake.txt')
-rw-r--r--release_docs/USING_HDF5_CMake.txt93
1 files changed, 37 insertions, 56 deletions
diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt
index 2cdf798..64d1a2a 100644
--- a/release_docs/USING_HDF5_CMake.txt
+++ b/release_docs/USING_HDF5_CMake.txt
@@ -36,7 +36,7 @@ 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
+ web site. The HDF5 1.10.x product requires a minimum CMake version
of 3.1.0.
2. You have installed the HDF5 library built with CMake, by executing
@@ -47,7 +47,7 @@ I. Preconditions
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_DIR=C:/Program Files/HDF_Group/HDF5/1.10.x/cmake
(Note there are no quote characters used on Windows and all platforms
use forward slashes)
@@ -103,8 +103,8 @@ These steps are described in more detail below.
* Visual Studio 12 2013 Win64
* Visual Studio 11 2012
* Visual Studio 11 2012 Win64
- * Visual Studio 10 2010
- * Visual Studio 10 2010 Win64
+ * Visual Studio 14 2015
+ * Visual Studio 14 2015 Win64
<options> is:
* BUILD_TESTING:BOOL=ON
@@ -132,7 +132,7 @@ These steps are described in more detail below.
2.2 Alternative command line example on Windows in c:\MyHDFstuff\hdf5\build directory:
- cmake -G "Visual Studio 11" -DBUILD_TESTING:BOOL=ON ..
+ cmake -G "Visual Studio 12 2013" -DBUILD_TESTING:BOOL=ON ..
3. Build HDF5 Applications
@@ -228,30 +228,18 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# This script will build and run the examples from a folder
# Execute from a command line:
# ctest -S HDF5_Examples.cmake,OPTION=VALUE -C Release -V -O test.log
-# where valid options for OPTION are:
-# BUILD_GENERATOR - The cmake build generator:
-# Unix * Unix Makefiles
-# VS2015 * Visual Studio 14 2015
-# VS201564 * Visual Studio 14 2015 Win64
-# 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
-# CTEST_BUILD_CONFIGURATION - Release, Debug, etc
-# CTEST_SOURCE_NAME - source folder
-# STATIC_LIBRARIES - Build/use static libraries
-# FORTRAN_LIBRARIES - Build/use fortran libraries
-# NO_MAC_FORTRAN - Yes to be SHARED on a Mac
-##############################################################################
+###############################################################################################################
+
+set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
+set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
+
# handle input parameters to script.
-#BUILD_GENERATOR - which CMake generator to use, required
#INSTALLDIR - HDF5 root folder
#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF4Examples
#STATIC_LIBRARIES - Default is YES
#FORTRAN_LIBRARIES - Default is NO
+#JAVA_LIBRARIES - Default is NO
##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
@@ -264,38 +252,8 @@ if(DEFINED CTEST_SCRIPT_ARG)
endif()
endforeach()
endif()
-
-# build generator must be defined
-if(NOT DEFINED BUILD_GENERATOR)
- message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
-else()
- if(${BUILD_GENERATOR} STREQUAL "Unix")
- set(CMAKE_GENERATOR "Unix Makefiles")
- 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")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
- set(CMAKE_GENERATOR "Visual Studio 12 2013")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
- set(CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
- set(CMAKE_GENERATOR "Visual Studio 11 2012")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
- set(CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
- else()
- message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
- endif()
-endif()
-set(CTEST_CMAKE_GENERATOR "${CMAKE_GENERATOR}")
-set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
-
if(NOT DEFINED INSTALLDIR)
- if(WIN32)
- set(INSTALLDIR "C:\\Program\ Files\\myhdf5")
- else()
- set(INSTALLDIR "/usr/local/myhdf5")
- endif()
+ set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
endif()
if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
set(CTEST_BUILD_CONFIGURATION "Release")
@@ -305,9 +263,18 @@ if(NOT DEFINED CTEST_SOURCE_NAME)
endif()
if(NOT DEFINED STATIC_LIBRARIES)
set(STATICLIBRARIES "YES")
+else(NOT DEFINED STATIC_LIBRARIES)
+ set(STATICLIBRARIES "NO")
endif()
if(NOT DEFINED FORTRAN_LIBRARIES)
set(FORTRANLIBRARIES "NO")
+else(NOT DEFINED FORTRAN_LIBRARIES)
+ set(FORTRANLIBRARIES "YES")
+endif()
+if(NOT DEFINED JAVA_LIBRARIES)
+ set(JAVALIBRARIES "NO")
+else(NOT DEFINED JAVA_LIBRARIES)
+ set(JAVALIBRARIES "YES")
endif()
#TAR_SOURCE - name of tarfile
@@ -337,9 +304,14 @@ else(WIN32)
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
endif(WIN32)
if(${FORTRANLIBRARIES})
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
else()
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
+endif()
+if(${JAVALIBRARIES})
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=ON")
+else()
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=OFF")
endif()
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@")
@@ -421,8 +393,17 @@ ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
## --------------------------
ctest_start (Experimental)
ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}")
+if(LOCAL_SUBMIT)
+ ctest_submit (PARTS Configure Notes)
+endif()
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+if(LOCAL_SUBMIT)
+ ctest_submit (PARTS Build)
+endif()
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
+if(LOCAL_SUBMIT)
+ ctest_submit (PARTS Test)
+endif()
if(res GREATER 0)
message (FATAL_ERROR "tests FAILED")
endif()