diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2014-11-06 20:29:11 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2014-11-06 20:29:11 (GMT) |
commit | 05716e22396b6e727d353e2e14da7db4a26d0f89 (patch) | |
tree | 14f9963331bd33f885b14f862eb4f313eca1f535 | |
parent | 3ba28fb7ee35d27b6c86f3b5e5981e666fb12956 (diff) | |
download | hdf5-05716e22396b6e727d353e2e14da7db4a26d0f89.zip hdf5-05716e22396b6e727d353e2e14da7db4a26d0f89.tar.gz hdf5-05716e22396b6e727d353e2e14da7db4a26d0f89.tar.bz2 |
[svn-r25798] correct example cmake info
-rw-r--r-- | config/cmake/HDF518_Examples.cmake.in | 43 | ||||
-rw-r--r-- | release_docs/USING_CMake_Examples.txt | 6 |
2 files changed, 29 insertions, 20 deletions
diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index cab871e..5ebb9cd 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -11,8 +11,10 @@ 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") +#set(NO_MAC_FORTRAN "true") #set(BUILD_OPTIONS ""${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") #set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON) +set(CTEST_USE_TAR_SOURCE "true") ############################################################################################################### # Adjust the following SET Commands as needed @@ -50,31 +52,36 @@ if(APPLE) execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) set(ENV{CC} "${XCODE_CC}") set(ENV{CXX} "${XCODE_CXX}") - if(HDF_BUILD_FORTRAN AND BUILD_SHARED_LIBS) - message(FATAL_ERROR "error: Shared fortran is not supported, build static") - #set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - endif(HDF_BUILD_FORTRAN AND BUILD_SHARED_LIBS) + if(NOT NO_MAC_FORTRAN) + # Shared fortran is not supported, build static + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + else(NOT NO_MAC_FORTRAN) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") + 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}\"") -## Uncompress source in tar file provided ## -------------------------- -if(WIN32) - set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe") - message(STATUS "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(STATUS "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(CTEST_USE_TAR_SOURCE) + ## Uncompress source if tar or zip file provided + ## -------------------------- + if(WIN32) + set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe") + message(STATUS "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(STATUS "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(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) + 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 diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt index 299063f..6bc7ff0 100644 --- a/release_docs/USING_CMake_Examples.txt +++ b/release_docs/USING_CMake_Examples.txt @@ -73,9 +73,11 @@ 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 not build and test Fortran examples. +Line 15: uncomment to build and test Fortran examples. Line 16: uncomment to build and test Fortran examples with F2003 option. -Line 68: change the CTEST_7Z_COMMAND to a different unzip program. +Line 17: comment to use an existing source directory. + +Line 71: change the CTEST_7Z_COMMAND to a different unzip program. |