diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-08-21 15:44:35 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-08-21 15:44:35 (GMT) |
commit | 78d8f8d7d12e779f640cf037bc52fd7e8a07061c (patch) | |
tree | f6a2bb20a4a34804b0253c18c205c5f77103d843 /config/cmake | |
parent | ff14409081fe6a5826b25658577aaf59f8fbb78f (diff) | |
parent | 482a9c28e71b0c1b3767bcf30be3c534bbc65ed9 (diff) | |
download | hdf5-78d8f8d7d12e779f640cf037bc52fd7e8a07061c.zip hdf5-78d8f8d7d12e779f640cf037bc52fd7e8a07061c.tar.gz hdf5-78d8f8d7d12e779f640cf037bc52fd7e8a07061c.tar.bz2 |
[svn-r24044] Merging r23833 through r24043 from trunk.
Diffstat (limited to 'config/cmake')
-rw-r--r-- | config/cmake/CPack.Info.plist.in | 37 | ||||
-rw-r--r-- | config/cmake/CPack.cmake | 7 | ||||
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 8 | ||||
-rw-r--r-- | config/cmake/HDF518_Examples.cmake.in | 112 | ||||
-rw-r--r-- | config/cmake/hdf.gif | bin | 0 -> 1016 bytes |
5 files changed, 161 insertions, 3 deletions
diff --git a/config/cmake/CPack.Info.plist.in b/config/cmake/CPack.Info.plist.in new file mode 100644 index 0000000..a701a61 --- /dev/null +++ b/config/cmake/CPack.Info.plist.in @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> + +<plist version="1.0"> +<dict> +<key>IFMajorVersion</key> +<integer>@CPACK_PACKAGE_VERSION_MAJOR@</integer> +<key>IFMinorVersion</key> +<integer>@CPACK_PACKAGE_VERSION_MINOR@</integer> +<key>IFPkgFlagAllowBackRev</key> +<false/> +<key>IFPkgFlagAuthorizationAction</key> +<string>AdminAuthorization</string> +<key>IFPkgFlagDefaultLocation</key> +<string>@CPACK_PACKAGE_DEFAULT_LOCATION@</string> +<key>IFPkgFlagInstallFat</key> +<false/> +<key>IFPkgFlagIsRequired</key> +<false/> +<key>IFPkgFlagOverwritePermissions</key> +<true/> +<key>IFPkgFlagRelocatable</key> +<@CPACK_PACKAGE_RELOCATABLE@/> +<key>IFPkgFlagRestartAction</key> +<string>NoRestart</string> +<key>IFPkgFlagRootVolumeOnly</key> +<false/> +<key>IFPkgFlagUpdateInstalledLanguages</key> +<false/> +<key>IFPkgFlagUseUserMask</key> +<false/> +<key>IFPkgFormatVersion</key> +<real>0.10000000149011612</real> +<key>CFBundleIdentifier</key> +<string>org.@CPACK_PACKAGE_VENDOR@.@CPACK_PACKAGE_NAME@@CPACK_MODULE_VERSION_SUFFIX@</string> +</dict> +</plist> diff --git a/config/cmake/CPack.cmake b/config/cmake/CPack.cmake index d96fe43..bdfa5b8 100644 --- a/config/cmake/CPack.cmake +++ b/config/cmake/CPack.cmake @@ -442,6 +442,7 @@ if(NOT CPACK_GENERATOR) endif() else() option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON) + option(CPACK_BINARY_WIX "Enable to build WiX packages" OFF) option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF) endif() @@ -457,6 +458,7 @@ if(NOT CPACK_GENERATOR) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_WIX WIX) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP) endif() @@ -487,7 +489,7 @@ endif() mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11 CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2 CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ - CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE + CPACK_BINARY_NSIS CPACK_BINARY_WIX CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP) @@ -526,6 +528,9 @@ cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "") cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") +# WiX specific variables +cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}") + if(DEFINED CPACK_COMPONENTS_ALL) if(CPACK_MONOLITHIC_INSTALL) message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.") diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 78fcd7a..8c78c97 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -173,7 +173,9 @@ IF (WINDOWS) IF (NOT MINGW) SET (H5_HAVE_GETHOSTNAME 1) ENDIF (NOT MINGW) - SET (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1) + IF (NOT UNIX AND NOT CYGWIN AND NOT MINGW) + SET (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1) + ENDIF (NOT UNIX AND NOT CYGWIN AND NOT MINGW) SET (H5_HAVE_FUNCTION 1) SET (H5_GETTIMEOFDAY_GIVES_TZ 1) SET (H5_HAVE_TIMEZONE 1) @@ -611,7 +613,9 @@ IF (NOT WINDOWS) CHECK_FUNCTION_EXISTS (_getvideoconfig H5_HAVE__GETVIDEOCONFIG) CHECK_FUNCTION_EXISTS (gettextinfo H5_HAVE_GETTEXTINFO) CHECK_FUNCTION_EXISTS (_scrsize H5_HAVE__SCRSIZE) - CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo H5_HAVE_GETCONSOLESCREENBUFFERINFO) + IF (NOT CYGWIN AND NOT MINGW) + CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo H5_HAVE_GETCONSOLESCREENBUFFERINFO) + ENDIF (NOT CYGWIN AND NOT MINGW) CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" H5_HAVE_TIOCGWINSZ) CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" H5_HAVE_TIOCGETD) ENDIF (NOT WINDOWS) diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in new file mode 100644 index 0000000..699e2d0 --- /dev/null +++ b/config/cmake/HDF518_Examples.cmake.in @@ -0,0 +1,112 @@ +cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) +############################################################################################################### +# This script will build and run the examples from a compressed file +# Execute from a command line: +# ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log +############################################################################################################### + +set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@/@HDF5_PACKAGE_VERSION@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@") +set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) +set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) +set(CTEST_BUILD_CONFIGURATION "Release") + +############################################################################################################### +# Adjust the following SET Commands as needed +############################################################################################################### +if(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "-DUSE_SHARED_LIBS:BOOL=OFF") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake/hdf5") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") +else(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "-DUSE_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake/hdf5") + set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") +endif(WIN32) + +############################################################################################################### +# For any comments please contact cdashhelp@hdfgroup.org +# +############################################################################################################### + +#----------------------------------------------------------------------------- +# MAC machines need special option +#----------------------------------------------------------------------------- +if(APPLE) + # Compiler choice + execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) + set(ENV{CC} "${XCODE_CC}") + set(ENV{CXX} "${XCODE_CXX}") + # Shared fortran is not supported, build static + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + 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}\"") +## Uncompress source in tar file provided +## -------------------------- +if(WIN32) + set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe") + message("extracting... [${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip]") + execute_process(COMMAND ${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip RESULT_VARIABLE rv) +else(WIN32) + message("extracting... [${CTEST_CMAKE_COMMAND} -E tar -xvf ${CTEST_SOURCE_NAME}.tar.gz]") + execute_process(COMMAND tar -xvf ${CTEST_SOURCE_NAME}.tar.gz RESULT_VARIABLE rv) +endif(WIN32) + +if(NOT rv EQUAL 0) + message("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) + +#----------------------------------------------------------------------------- +## Clear the build directory +## -------------------------- +set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) +file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) + +# Use multiple CPU cores to build +include(ProcessorCount) +ProcessorCount(N) +if(NOT N EQUAL 0) + if(NOT WIN32) + set(CTEST_BUILD_FLAGS -j${N}) + endif(NOT WIN32) + set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) +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") + +#----------------------------------------------------------------------------- + ## NORMAL process + ## -------------------------- + CTEST_START (Experimental) + CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}") + CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}") + CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND) + CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) + if(res GREATER 0) + message (FATAL_ERROR "tests FAILED") + endif(res GREATER 0) +#----------------------------------------------------------------------------- +############################################################################################################## +message("DONE")
\ No newline at end of file diff --git a/config/cmake/hdf.gif b/config/cmake/hdf.gif Binary files differnew file mode 100644 index 0000000..656617b --- /dev/null +++ b/config/cmake/hdf.gif |