summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/cmake/HDF5_Examples.cmake.in23
-rw-r--r--release_docs/USING_CMake_Examples.txt57
2 files changed, 41 insertions, 39 deletions
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in
index 81f9702..feccb1a 100644
--- a/config/cmake/HDF5_Examples.cmake.in
+++ b/config/cmake/HDF5_Examples.cmake.in
@@ -14,7 +14,6 @@ set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF4Examples
#STATICLIBRARIES - Default is YES
-#TAR_SOURCE - name of tarfile
#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
@@ -39,6 +38,8 @@ endif()
if(NOT DEFINED STATICLIBRARIES)
set(STATICLIBRARIES "YES")
endif()
+
+#TAR_SOURCE - name of tarfile
#if(NOT DEFINED TAR_SOURCE)
# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.1-Source")
#endif()
@@ -87,7 +88,7 @@ if(APPLE)
endif(NOT NO_MAC_FORTRAN)
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
endif(APPLE)
-
+
#-----------------------------------------------------------------------------
set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
## --------------------------
@@ -96,19 +97,19 @@ if(CTEST_USE_TAR_SOURCE)
## --------------------------
if(WIN32)
message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
- else(WIN32)
+ execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
+ else()
message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
- endif(WIN32)
-
+ execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
+ endif()
+
if(NOT rv EQUAL 0)
message(STATUS "extracting... [error-(${rv}) clean up]")
file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed")
endif(NOT rv EQUAL 0)
endif(CTEST_USE_TAR_SOURCE)
-
+
#-----------------------------------------------------------------------------
## Clear the build directory
## --------------------------
@@ -131,11 +132,11 @@ endif()
set (CTEST_CONFIGURE_COMMAND
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
-
+
#-----------------------------------------------------------------------------
## -- set output to english
set($ENV{LC_MESSAGES} "en_EN")
-
+
#-----------------------------------------------------------------------------
configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
@@ -149,5 +150,5 @@ if(res GREATER 0)
message (FATAL_ERROR "tests FAILED")
endif(res GREATER 0)
#-----------------------------------------------------------------------------
-##############################################################################################################
+##############################################################################################################
message(STATUS "DONE") \ No newline at end of file
diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt
index d52a719..a6854ae 100644
--- a/release_docs/USING_CMake_Examples.txt
+++ b/release_docs/USING_CMake_Examples.txt
@@ -28,8 +28,8 @@ I. Preconditions
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 www.hdfgroup.org. See Section "III. Common changes to the
- HDF518_Examples.cmake file", for the line to change the location.
+ at www.hdfgroup.org.
+
========================================================================
@@ -37,40 +37,41 @@ II. Building HDF5 Examples with CMake
========================================================================
Files in the HDF5 install directory:
- HDF5Examples-0.1.1-Source folder
+ HDF5Examples folder
HDF518_Examples.cmake
Default installation process:
Create a directory to run the examples, i.e. \test_hdf5.
- Copy HDF5Examples-0.1.1-Source folder to this directory.
- Copy HDF518_Examples.cmake to this directory.
- Edit line 8 of the HDF518_Examples.cmake file and change the INSTALLDIR
- to the HDF5 install location.
-
- Execute from this directory:
- ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log
-
-The script will use the examples folder HDF5Examples-0.1.1-Source,
- and create a build directory inside the HDF5Examples-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.
+ Copy HDF5Examples folder to this directory.
+ Copy HDF5_Examples.cmake to this directory.
+ The default source folder is defined as "HDF5Examples". It can be changed
+ with the CTEST_SOURCE_NAME script option.
+ The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
+ It can be changed with the INSTALLDIR script option.
+ The default ctest configuration is defined as "Release". It can be changed
+ with the CTEST_BUILD_CONFIGURATION script option. Note that this must
+ be the same as the value used with the -C command line option.
+ The default build configuration is defined to build and use static libraries.
+ Shared libraries can be used with the STATICLIBRARIES script option set to "NO".
+ Other options can be changed by editing the HDF5_Examples.cmake file.
+
+ If the defaults are okay, execute from this directory:
+ ctest -S HDF5_Examples.cmake -C Release -V -O test.log
+ If the defaults need change, execute from this directory:
+ ctest -S HDF5_Examples.cmake,CTEST_SOURCE_NAME=MyExamples,INSTALLDIR=MyLocation -C Release -V -O test.log
+
+ When executed, the ctest script will save the results to the log file, test.log, as
+ indicated by the ctest command. If you wish the to see more build and test information,
+ add "-VV" to the ctest command. The output should show;
+ 100% tests passed, 0 tests failed out of 156.
========================================================================
-III. Common changes to the HDF518_Examples.cmake file
+III. Other changes to the HDF518_Examples.cmake file
========================================================================
-Line 8: change the INSTALLDIR to a different HDF5 install location.
-
-Line 14: uncomment to allow Mac machines to build shared examples.
-
-Line 15: uncomment to build and test Fortran examples.
-
-Line 16: comment to NOT build and test Fortran examples with F2003 option.
+Line 10: uncomment to build and test Fortran examples.
-Line 17: uncomment to use a compressed source file.
+Line 43-45: uncomment to use a source tarball or zipfile;
+ Add script option "TAR_SOURCE=MySource.tar".