diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-11-05 19:03:06 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-11-05 19:03:06 (GMT) |
commit | 26b328aec8e10b9101c76bc049b6b5045b5f00a5 (patch) | |
tree | 3d5cb4707febc7d52fe0d325fa06b143bfc68820 /config/cmake | |
parent | eb13dc7ec9281a9206f6e0a2a54151adf2ddecd3 (diff) | |
parent | 401f0c181ea8e9f486203a6b70710f0631a4a640 (diff) | |
download | hdf5-26b328aec8e10b9101c76bc049b6b5045b5f00a5.zip hdf5-26b328aec8e10b9101c76bc049b6b5045b5f00a5.tar.gz hdf5-26b328aec8e10b9101c76bc049b6b5045b5f00a5.tar.bz2 |
[svn-r28288] merge from trunk.
Diffstat (limited to 'config/cmake')
-rw-r--r-- | config/cmake/ConversionTests.c | 14 | ||||
-rw-r--r-- | config/cmake/H5pubconf.h.in | 21 | ||||
-rw-r--r-- | config/cmake/HDF518_Examples.cmake.in | 106 | ||||
-rw-r--r-- | config/cmake/HDF5UseFortran.cmake | 10 | ||||
-rw-r--r-- | config/cmake/HDF5_Examples.cmake.in | 41 | ||||
-rwxr-xr-x | config/cmake/scripts/CTestScript.cmake | 90 | ||||
-rwxr-xr-x | config/cmake/scripts/HDF5config.cmake (renamed from config/cmake/scripts/HDF518config.cmake) | 160 |
7 files changed, 311 insertions, 131 deletions
diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c index d964bf8..b8946a8 100644 --- a/config/cmake/ConversionTests.c +++ b/config/cmake/ConversionTests.c @@ -1,5 +1,8 @@ #ifdef H5_LDOUBLE_TO_LONG_SPECIAL_TEST +#include <string.h> +#include <stdlib.h> + int main(void) { long double ld = 20041683600089727.779961L; @@ -58,6 +61,9 @@ done: #ifdef H5_LONG_TO_LDOUBLE_SPECIAL_TEST +#include <string.h> +#include <stdlib.h> + int main(void) { long double ld; @@ -117,6 +123,10 @@ done: #endif #ifdef H5_LDOUBLE_TO_LLONG_ACCURATE_TEST + +#include <string.h> +#include <stdlib.h> + int main(void) { long double ld = 20041683600089727.779961L; @@ -156,6 +166,10 @@ done: #endif #ifdef H5_LLONG_TO_LDOUBLE_CORRECT_TEST + +#include <string.h> +#include <stdlib.h> + int main(void) { long double ld; diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 72fd19a..0f862c9 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -160,6 +160,9 @@ /* Define to 1 if you have the `gettimeofday' function. */ #cmakedefine H5_HAVE_GETTIMEOFDAY @H5_HAVE_GETTIMEOFDAY@ +/* Define if the compiler understands inline */ +#cmakedefine H5_HAVE_INLINE @H5_HAVE_INLINE@ + /* Define if library will contain instrumentation to detect correct optimization operation */ #cmakedefine H5_HAVE_INSTRUMENTED_LIBRARY @H5_HAVE_INSTRUMENTED_LIBRARY@ @@ -374,6 +377,12 @@ /* Define to 1 if you have the `_scrsize' function. */ #cmakedefine H5_HAVE__SCRSIZE @H5_HAVE__SCRSIZE@ +/* Define if the compiler understands __inline */ +#cmakedefine H5_HAVE___INLINE @H5_HAVE___INLINE@ + +/* Define if the compiler understands __inline__ */ +#cmakedefine H5_HAVE___INLINE__ @H5_HAVE___INLINE__@ + /* Define if HDF5's high-level library headers should be included in hdf5.h */ #cmakedefine H5_INCLUDE_HL @H5_INCLUDE_HL@ @@ -566,6 +575,12 @@ /* The size of `__int64', as computed by sizeof. */ #define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@ +/* Define to 1 if you have the <stdbool.h> header file. */ +#cmakedefine H5_HAVE_STDBOOL_H @H5_HAVE_STDBOOL_H@ + +/* The size of `bool', as computed by sizeof. */ +#cmakedefine H5_SIZEOF_BOOL @H5_SIZEOF_BOOL@ + /* Define to 1 if you have the ANSI C header files. */ #cmakedefine H5_STDC_HEADERS @H5_STDC_HEADERS@ @@ -622,12 +637,6 @@ /* Define to empty if `const' does not conform to ANSI C. */ #cmakedefine H5_const -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#cmakedefine H5_inline @H5_inline@ -#endif - /* Define to `long int' if <sys/types.h> does not define. */ #cmakedefine H5_off_t diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index c82fcf2..0e3b26d 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -1,47 +1,85 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) ############################################################################################################### -# This script will build and run the examples from a compressed file +# This script will build and run the examples from a folder # Execute from a command line: -# ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -VV -O test.log +# ctest -S HDF518_Examples.cmake,OPTION=VALUE -C Release -VV -O test.log ############################################################################################################### -set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") 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") -#set(NO_MAC_FORTRAN "true") -#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") -#set(CTEST_USE_TAR_SOURCE "${CTEST_SCRIPT_ARG}") + +# handle input parameters to script. +#INSTALLDIR - HDF5-1.8 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 +##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 + # script.ctest,var1=value1,var2=value2 + # to variables with the respective names set to the respective values + string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") + foreach(current_var ${script_args}) + if ("${current_var}" MATCHES "^([^=]+)=(.+)$") + set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") + endif() + endforeach() +endif() +if(NOT DEFINED INSTALLDIR) + set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") +endif() +if(NOT DEFINED CTEST_BUILD_CONFIGURATION) + set(CTEST_BUILD_CONFIGURATION "Release") +endif() +if(NOT DEFINED CTEST_SOURCE_NAME) + set(CTEST_SOURCE_NAME "HDF5Examples") +endif() +if(NOT DEFINED STATIC_LIBRARIES) + set(STATICLIBRARIES "YES") +endif() +if(NOT DEFINED FORTRAN_LIBRARIES) + set(FORTRANLIBRARIES "NO") +endif() + +#TAR_SOURCE - name of tarfile +#if(NOT DEFINED TAR_SOURCE) +# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.2.1-Source") +#endif() ############################################################################################################### # Adjust the following SET Commands as needed ############################################################################################################### if(WIN32) - if(STATICLIBRARIES) + if(${STATICLIBRARIES}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") - endif(STATICLIBRARIES) + endif() set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake") 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) + if(${STATICLIBRARIES}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - endif(STATICLIBRARIES) + endif() set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") 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) +if(${FORTRANLIBRARIES}) + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") +else() + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") +endif() +set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### # For any comments please contact cdashhelp@hdfgroup.org # ############################################################################################################### - + #----------------------------------------------------------------------------- # MAC machines need special option #----------------------------------------------------------------------------- @@ -52,14 +90,14 @@ if(APPLE) set(ENV{CC} "${XCODE_CC}") set(ENV{CXX} "${XCODE_CXX}") if(NOT NO_MAC_FORTRAN) - # Shared fortran is not supported, build static + # 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) + else() set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") - endif(NOT NO_MAC_FORTRAN) + endif() set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") -endif(APPLE) - +endif() + #----------------------------------------------------------------------------- set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") ## -------------------------- @@ -68,28 +106,28 @@ 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() endif(CTEST_USE_TAR_SOURCE) - + #----------------------------------------------------------------------------- ## Clear the build directory ## -------------------------- set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) -else (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +else () file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") -endif (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +endif () # Use multiple CPU cores to build include(ProcessorCount) @@ -97,17 +135,17 @@ ProcessorCount(N) if(NOT N EQUAL 0) if(NOT WIN32) set(CTEST_BUILD_FLAGS -j${N}) - endif(NOT WIN32) + endif() 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") - + #----------------------------------------------------------------------------- configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake) ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}") @@ -119,7 +157,7 @@ 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) +endif() #----------------------------------------------------------------------------- -############################################################################################################## -message(STATUS "DONE") +############################################################################################################## +message(STATUS "DONE")
\ No newline at end of file diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 8ca10a7..c3e5a24 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -217,9 +217,9 @@ list(GET PROG_OUTPUT 4 NUM_RKIND) set(H5CONFIG_F_NUM_IKIND "INTEGER, PARAMETER :: num_ikinds = ${NUM_IKIND}") set(H5CONFIG_F_IKIND "INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/${pac_validIntKinds}/)") -message ( " ........REAL KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") -message ( " ........INTEGER KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") -message ( " ........MAX DECIMAL PRECISION ${H5_PAC_FC_MAX_REAL_PRECISION}") +message (STATUS "....REAL KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") +message (STATUS "....INTEGER KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}") +message (STATUS "....MAX DECIMAL PRECISION ${H5_PAC_FC_MAX_REAL_PRECISION}") #----------------------------------------------------------------------------- # Determine the available KINDs for REALs and INTEGERs @@ -258,7 +258,7 @@ string(REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}") set(PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}") -message("...FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}") +message(STATUS "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}") # ********** # REALS # ********** @@ -297,7 +297,7 @@ string(REGEX REPLACE " " "" pack_real_sizeof "${pack_real_sizeof}") set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${pack_real_sizeof}/)") -message("...FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}") +message(STATUS "....FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}") set(PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}") diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index 65e2e9e..a25eef5 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -7,14 +7,14 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) -#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") # handle input parameters to script. #INSTALLDIR - HDF5 root folder #CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo #CTEST_SOURCE_NAME - name of source folder; HDF4Examples -#STATICLIBRARIES - Default is YES -#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac) +#STATIC_LIBRARIES - Default is YES +#FORTRAN_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 # script.ctest,var1=value1,var2=value2 @@ -35,9 +35,12 @@ endif() if(NOT DEFINED CTEST_SOURCE_NAME) set(CTEST_SOURCE_NAME "HDF5Examples") endif() -if(NOT DEFINED STATICLIBRARIES) +if(NOT DEFINED STATIC_LIBRARIES) set(STATICLIBRARIES "YES") endif() +if(NOT DEFINED FORTRAN_LIBRARIES) + set(FORTRANLIBRARIES "NO") +endif() #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) @@ -48,23 +51,29 @@ endif() # Adjust the following SET Commands as needed ############################################################################################################### if(WIN32) - if(STATICLIBRARIES) + if(${STATICLIBRARIES}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") - endif(STATICLIBRARIES) + endif() set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake") 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) + if(${STATICLIBRARIES}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - endif(STATICLIBRARIES) + endif() set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") 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) +if(${FORTRANLIBRARIES}) + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") +else() + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") +endif() +set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### # For any comments please contact cdashhelp@hdfgroup.org @@ -83,11 +92,11 @@ if(APPLE) 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) + else() set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") - endif(NOT NO_MAC_FORTRAN) + endif() set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") -endif(APPLE) +endif() #----------------------------------------------------------------------------- set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") @@ -107,7 +116,7 @@ if(CTEST_USE_TAR_SOURCE) 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() endif(CTEST_USE_TAR_SOURCE) #----------------------------------------------------------------------------- @@ -116,9 +125,9 @@ endif(CTEST_USE_TAR_SOURCE) set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) -else (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +else () file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") -endif (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +endif () # Use multiple CPU cores to build include(ProcessorCount) @@ -126,7 +135,7 @@ ProcessorCount(N) if(NOT N EQUAL 0) if(NOT WIN32) set(CTEST_BUILD_FLAGS -j${N}) - endif(NOT WIN32) + endif() set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) endif() set (CTEST_CONFIGURE_COMMAND @@ -148,7 +157,7 @@ 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) +endif() #----------------------------------------------------------------------------- ############################################################################################################## message(STATUS "DONE")
\ No newline at end of file diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index 0cd686a..403eedd 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -4,9 +4,9 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) # For any comments please contact cdashhelp@hdfgroup.org
#
########################################################
-# -----------------------------------------------------------
+# -----------------------------------------------------------
# -- Get environment
-# -----------------------------------------------------------
+# -----------------------------------------------------------
if(NOT SITE_OS_NAME)
## machine name not provided - attempt to discover with uname
## -- set hostname
@@ -18,7 +18,7 @@ if(NOT SITE_OS_NAME) macro(getuname name flag)
exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
endmacro(getuname)
-
+
getuname(osname -s)
getuname(osrel -r)
getuname(cpu -m)
@@ -45,7 +45,7 @@ else(NOT SITE_OS_NAME) endif()
set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
endif(NOT SITE_OS_NAME)
-
+
#-----------------------------------------------------------------------------
# MAC machines need special option
#-----------------------------------------------------------------------------
@@ -56,6 +56,13 @@ if(APPLE) set(ENV{CC} "${XCODE_CC}")
set(ENV{CXX} "${XCODE_CXX}")
+ 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} -DHDF5_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)
@@ -66,10 +73,10 @@ if(CTEST_USE_TAR_SOURCE) ## Uncompress source if tar file provided
## --------------------------
if(WIN32)
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_USE_TAR_SOURCE}.zip]")
+ message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
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]")
+ message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
endif()
@@ -78,8 +85,9 @@ if(CTEST_USE_TAR_SOURCE) file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
message(FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
endif()
-
+
file(RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
+ set(LOCAL_SKIP_UPDATE "TRUE")
else(CTEST_USE_TAR_SOURCE)
if(LOCAL_UPDATE)
if(CTEST_USE_GIT_SOURCE)
@@ -120,7 +128,7 @@ else(CTEST_USE_TAR_SOURCE) if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
set(NEED_REPOSITORY_CHECKOUT 1)
endif()
-
+
if(NOT CTEST_REPO_VERSION)
set(CTEST_REPO_VERSION "HEAD")
endif()
@@ -135,7 +143,7 @@ else(CTEST_USE_TAR_SOURCE) endif(CTEST_USE_GIT_SOURCE)
endif(LOCAL_UPDATE)
endif(CTEST_USE_TAR_SOURCE)
-
+
#-----------------------------------------------------------------------------
## Clear the build directory
## --------------------------
@@ -155,14 +163,25 @@ if(NOT N EQUAL 0) endif()
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
-
+
#-----------------------------------------------------------------------------
# Send the main script as a note.
-list(APPEND CTEST_NOTES_FILES
- "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
- "${CMAKE_CURRENT_LIST_FILE}"
- "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
-)
+if(USE_AUTOTOOLS)
+ ## autotools builds need to use make and does not use the cacheinit.cmake file
+ ## -- make command
+ ## -----------------
+ find_program(MAKE NAMES make)
+ list(APPEND CTEST_NOTES_FILES
+ "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
+ "${CMAKE_CURRENT_LIST_FILE}"
+ )
+else()
+ list(APPEND CTEST_NOTES_FILES
+ "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
+ "${CMAKE_CURRENT_LIST_FILE}"
+ "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
+ )
+endif()
#-----------------------------------------------------------------------------
# Check for required variables.
@@ -176,28 +195,35 @@ foreach(req message(FATAL_ERROR "The containing script must set ${req}")
endif()
endforeach(req)
-
+
#-----------------------------------------------------------------------------
# Initialize the CTEST commands
#------------------------------
-if(LOCAL_MEMCHECK_TEST)
- find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
- set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
- )
-else()
- if(LOCAL_COVERAGE_TEST)
- find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
+if(USE_AUTOTOOLS)
+ set(CTEST_CONFIGURE_COMMAND "${CTEST_SOURCE_DIRECTORY}/configure ${ADD_BUILD_OPTIONS}")
+ set(CTEST_BUILD_COMMAND "${MAKE} ${CTEST_BUILD_FLAGS}")
+ configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+ file(WRITE ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake "ADD_TEST(makecheck \"${MAKE}\" \"${CTEST_BUILD_FLAGS}\" \"-i\" \"check\")")
+else(USE_AUTOTOOLS)
+ if(LOCAL_MEMCHECK_TEST)
+ find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
+ set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ )
+ else()
+ if(LOCAL_COVERAGE_TEST)
+ find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
+ 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}\""
+ )
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}\""
- )
endif()
#-----------------------------------------------------------------------------
## -- set output to english
set($ENV{LC_MESSAGES} "en_EN")
-
+
# Print summary information.
foreach(v
CTEST_SITE
@@ -215,7 +241,7 @@ foreach(v set(vars "${vars} ${v}=[${${v}}]\n")
endforeach(v)
message(STATUS "Dashboard script configuration:\n${vars}\n")
-
+
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
## NORMAL process
@@ -235,12 +261,12 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") if(LOCAL_SUBMIT)
ctest_submit (PARTS Update Configure Notes)
endif()
-
+
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
if(LOCAL_SUBMIT)
ctest_submit (PARTS Build)
endif()
-
+
if(NOT LOCAL_SKIP_TEST)
if(NOT LOCAL_MEMCHECK_TEST)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
@@ -263,7 +289,7 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") endif()
endif()
endif(NOT LOCAL_SKIP_TEST)
-
+
if(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE)
##-----------------------------------------------
## Package the product
diff --git a/config/cmake/scripts/HDF518config.cmake b/config/cmake/scripts/HDF5config.cmake index aee5389..8bcc56b 100755 --- a/config/cmake/scripts/HDF518config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -1,16 +1,98 @@ -##########################################################################
-### For Windows ${CTEST_SCRIPT_ARG} is one of ###
-### [64-VS2013, 32-VS2013, 64-VS2012, 32-VS2012] ###
-### ctest -S HDF518config.cmake,32-VS2012 -C Release -VV -O hdf518.log ###
-### ###
-### Other platforms do not use ${CTEST_SCRIPT_ARG} ###
-### ctest -S HDF518config.cmake -C Release -VV -O hdf518.log ###
-##########################################################################
+#############################################################################################
+### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
+### BUILD_GENERATOR required [Unix, VS2015, VS201564, VS2013, VS201364, VS2012, VS201264] ###
+### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -V -O hdf519.log ###
+#############################################################################################
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
-set(CTEST_SOURCE_VERSION 1.8.15)
+############################################################################
+# Usage:
+# ctest -S HDF518config.cmake,OPTION=VALUE -C Release -VV -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_SOURCE_VERSION 1.9)
set(CTEST_SOURCE_VERSEXT "")
-set(CTEST_SOURCE_NAME hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT})
+
+##############################################################################
+# handle input parameters to script.
+#BUILD_GENERATOR - which CMake generator to use, required
+#INSTALLDIR - HDF5-1.9 root folder
+#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
+#CTEST_SOURCE_NAME - name of source folder; HDF5-1.9
+#STATIC_LIBRARIES - Default is YES
+#FORTRAN_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
+ # script.ctest,var1=value1,var2=value2
+ # to variables with the respective names set to the respective values
+ string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+ foreach(current_var ${script_args})
+ if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
+ set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+ 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(CTEST_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(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
+ set(CTEST_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()
+
+if(NOT DEFINED INSTALLDIR)
+ if(WIN32)
+ set(INSTALLDIR "C:\\Program\ Files\\myhdf5")
+ else()
+ set(INSTALLDIR "/usr/local/myhdf5")
+ endif()
+endif()
+if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
+ set(CTEST_BUILD_CONFIGURATION "Release")
+endif()
+if(NOT DEFINED CTEST_SOURCE_NAME)
+ set(CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+endif()
+if(NOT DEFINED STATIC_LIBRARIES)
+ set(STATICLIBRARIES "YES")
+endif()
+if(NOT DEFINED FORTRAN_LIBRARIES)
+ set(FORTRANLIBRARIES "NO")
+endif()
+
set(CTEST_BINARY_NAME "build")
set(CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
if(WIN32)
@@ -22,40 +104,38 @@ else() endif()
###################################################################
-### Following Line is one of [Release, RelWithDebInfo, Debug] #####
-set(CTEST_BUILD_CONFIGURATION "Release")
-###################################################################
-
-###################################################################
######### Following describes compiler ############
if(WIN32)
set(SITE_OS_NAME "Windows")
set(SITE_OS_VERSION "WIN7")
- if(${CTEST_SCRIPT_ARG} STREQUAL "64-VS2013")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
+ if(${BUILD_GENERATOR} STREQUAL "VS201564")
+ set(SITE_OS_BITS "64")
+ set(SITE_COMPILER_NAME "vs2015")
+ set(SITE_COMPILER_VERSION "14")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
+ set(SITE_OS_BITS "32")
+ set(SITE_COMPILER_NAME "vs2015")
+ set(SITE_COMPILER_VERSION "14")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
set(SITE_OS_BITS "64")
set(SITE_COMPILER_NAME "vs2013")
set(SITE_COMPILER_VERSION "12")
- elseif(${CTEST_SCRIPT_ARG} STREQUAL "32-VS2013")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
set(SITE_OS_BITS "32")
set(SITE_COMPILER_NAME "vs2013")
set(SITE_COMPILER_VERSION "12")
- elseif(${CTEST_SCRIPT_ARG} STREQUAL "64-VS2012")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
set(SITE_OS_BITS "64")
set(SITE_COMPILER_NAME "vs2012")
set(SITE_COMPILER_VERSION "11")
- elseif(${CTEST_SCRIPT_ARG} STREQUAL "32-VS2012")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
set(SITE_OS_BITS "32")
set(SITE_COMPILER_NAME "vs2012")
set(SITE_COMPILER_VERSION "11")
endif()
## Set the following to unique id your computer ##
- set(CTEST_SITE "WIN7${CTEST_SCRIPT_ARG}.XXXX")
+ set(CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
else()
- set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
## Set the following to unique id your computer ##
if(APPLE)
set(CTEST_SITE "MAC.XXXX")
@@ -69,9 +149,6 @@ endif() ######### Following is for submission to CDash ############
###################################################################
set(MODEL "Experimental")
-######### Following describes computer ############
-## following is optional to describe build ##
-set(SITE_BUILDNAME_SUFFIX "STATIC")
###################################################################
###################################################################
@@ -85,19 +162,25 @@ set(SITE_BUILDNAME_SUFFIX "STATIC") #set(LOCAL_NO_PACKAGE "TRUE")
##### Following controls source update #####
#set(LOCAL_UPDATE "TRUE")
-set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8")
+set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/trunk")
#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
-#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
###################################################################
###################################################################
#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ")
-### uncomment/comment or change the following lines for configuration options
+###################################################################
+if(${STATICLIBRARIES})
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
+ ######### Following describes computer ############
+ ## following is optional to describe build ##
+ set(SITE_BUILDNAME_SUFFIX "STATIC")
+endif()
+###################################################################
-### comment the following line or change OFF to ON in order to build shared libraries
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
+### uncomment/comment and change the following lines for other configuration options
#### ext libraries ####
### ext libs from tgz
@@ -112,10 +195,11 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING #set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
#### fortran ####
-### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
-### disable Fortran; change OFF to ON in order to build FORTRAN libraries
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+if(${FORTRANLIBRARIES})
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
+else()
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+endif()
### disable test program builds
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
@@ -126,7 +210,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF") set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
### change install prefix
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=install")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
###################################################################
|