diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/H5pubconf.h.in | 18 | ||||
-rw-r--r-- | config/cmake/HDF518_Examples.cmake.in | 8 | ||||
-rw-r--r-- | config/cmake/HDF5UseFortran.cmake | 109 | ||||
-rw-r--r-- | config/cmake/HDF5_Examples.cmake.in | 8 | ||||
-rw-r--r-- | config/cmake/README.txt.cmake.in | 2 | ||||
-rw-r--r-- | config/cmake/cacheinit.cmake | 4 | ||||
-rw-r--r-- | config/cmake/mccacheinit.cmake | 4 | ||||
-rwxr-xr-x | config/cmake/scripts/CTestScript.cmake | 8 | ||||
-rwxr-xr-x | config/cmake/scripts/HDF5config.cmake | 8 | ||||
-rw-r--r-- | config/cmake_ext_mod/ConfigureChecks.cmake | 16 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFCXXTests.cpp | 35 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFMacros.cmake | 10 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFTests.c | 49 | ||||
-rw-r--r-- | config/cygwin (renamed from config/i386-pc-cygwin32) | 13 | ||||
-rw-r--r-- | config/i686-pc-cygwin | 137 | ||||
-rw-r--r-- | config/x86_64-pc-cygwin | 138 |
16 files changed, 125 insertions, 442 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 31c5afb..5dad4f3 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -199,9 +199,21 @@ /* Define to 1 if you have the `z' library (-lz). */ #cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@ +/* Define to 1 if you have the `llround' function. */ +#cmakedefine H5_HAVE_LLROUND @H5_HAVE_LLROUND@ + +/* Define to 1 if you have the `llroundf' function. */ +#cmakedefine H5_HAVE_LLROUNDF @H5_HAVE_LLROUNDF@ + /* Define to 1 if you have the `longjmp' function. */ #cmakedefine H5_HAVE_LONGJMP @H5_HAVE_LONGJMP@ +/* Define to 1 if you have the `lround' function. */ +#cmakedefine H5_HAVE_LROUND @H5_HAVE_LROUND@ + +/* Define to 1 if you have the `lroundf' function. */ +#cmakedefine H5_HAVE_LROUNDF @H5_HAVE_LROUNDF@ + /* Define to 1 if you have the `lseek64' function. */ #cmakedefine H5_HAVE_LSEEK64 @H5_HAVE_LSEEK64@ @@ -241,6 +253,12 @@ /* Define to 1 if you have the `rand_r' function. */ #cmakedefine H5_HAVE_RAND_R @H5_HAVE_RAND_R@ +/* Define to 1 if you have the `round' function. */ +#cmakedefine H5_HAVE_ROUNDF @H5_HAVE_ROUNDF@ + +/* Define to 1 if you have the `roundf' function. */ +#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@ + /* Define to 1 if you have the `setjmp' function. */ #cmakedefine H5_HAVE_SETJMP @H5_HAVE_SETJMP@ diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 135dcfc..561bdb7 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -10,7 +10,7 @@ set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) # handle input parameters to script. #INSTALLDIR - HDF5-1.8 root folder -#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo +#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo #CTEST_SOURCE_NAME - name of source folder; HDF4Examples #STATIC_LIBRARIES - Default is YES #FORTRAN_LIBRARIES - Default is NO @@ -29,8 +29,8 @@ endif() if(NOT DEFINED INSTALLDIR) set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") endif() -if(NOT DEFINED CTEST_BUILD_CONFIGURATION) - set(CTEST_BUILD_CONFIGURATION "Release") +if(NOT DEFINED CTEST_CONFIGURATION_TYPE) + set(CTEST_CONFIGURATION_TYPE "Release") endif() if(NOT DEFINED CTEST_SOURCE_NAME) set(CTEST_SOURCE_NAME "HDF5Examples") @@ -143,7 +143,7 @@ if(NOT N EQUAL 0) 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}\"" + "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"" ) #----------------------------------------------------------------------------- diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 66e70b4..41efadc 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -19,7 +19,7 @@ ENABLE_LANGUAGE (Fortran) # so this one is used. #----------------------------------------------------------------------------- MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN) -# MSB CHECK WHY THIS CHECK? +# # if (NOT DEFINED ${RUN_RESULT_VAR}) message (STATUS "Detecting Fortran ${FUNCTION}") if (CMAKE_REQUIRED_LIBRARIES) @@ -39,8 +39,6 @@ MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN) RUN_OUTPUT_VARIABLE OUTPUT ) - - set(${RETURN} ${OUTPUT}) #message ( "Test result1 ${RETURN} ") @@ -70,17 +68,22 @@ MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN) # endif (NOT DEFINED ${RUN_RESULT_VAR}) ENDMACRO (FORTRAN_RUN) +# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END" +MACRO (READ_SOURCE START END RETURN) + file(READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" CODE) + string(REGEX MATCH "${START}[\\\t\\\n\\\r[].+]*${END}" CODE ${CODE}) + set(RETURN "${CODE}") +ENDMACRO (READ_SOURCE START END RETURN) + #----------------------------------------------------------------------------- # Check to see C_LONG_DOUBLE is available + +READ_SOURCE("PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" "END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" CODE) CHECK_FORTRAN_FEATURE(c_long_double - " - PROGRAM main - USE ISO_C_BINDING - REAL(KIND=C_LONG_DOUBLE) :: d - END PROGRAM - " + "${CODE}" FORTRAN_HAVE_C_LONG_DOUBLE ) + if (${FORTRAN_HAVE_C_LONG_DOUBLE}) set(FORTRAN_HAVE_C_LONG_DOUBLE 1) else () @@ -89,31 +92,9 @@ endif() # Check to see C_LONG_DOUBLE is different from C_DOUBLE +READ_SOURCE("MODULE type_mod" "END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE" CODE) CHECK_FORTRAN_FEATURE(c_long_double - " - MODULE type_mod - USE ISO_C_BINDING - INTERFACE h5t - MODULE PROCEDURE h5t_c_double - MODULE PROCEDURE h5t_c_long_double - END INTERFACE - CONTAINS - SUBROUTINE h5t_c_double(r) - REAL(KIND=C_DOUBLE) :: r - END SUBROUTINE h5t_c_double - SUBROUTINE h5t_c_long_double(d) - REAL(KIND=C_LONG_DOUBLE) :: d - END SUBROUTINE h5t_c_long_double - END MODULE type_mod - PROGRAM main - USE ISO_C_BINDING - USE type_mod - REAL(KIND=C_DOUBLE) :: r - REAL(KIND=C_LONG_DOUBLE) :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main - " + "${CODE}" FORTRAN_C_LONG_DOUBLE_IS_UNIQUE ) if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE}) @@ -139,66 +120,9 @@ endif(FORTRAN_HAVE_STORAGE_SIZE) # Determine the available KINDs for REALs and INTEGERs #----------------------------------------------------------------------------- +READ_SOURCE("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" CODE) FORTRAN_RUN("REAL and INTEGER KINDs" - " - PROGRAM main - IMPLICIT NONE - INTEGER :: ik, jk, k, max_decimal_prec - INTEGER :: num_rkinds = 1, num_ikinds = 1 - INTEGER, DIMENSION(1:10) :: list_ikinds = -1 - INTEGER, DIMENSION(1:10) :: list_rkinds = -1 - - ! Find integer KINDs - list_ikinds(num_ikinds)=SELECTED_INT_KIND(1) - DO ik = 2, 36 - k = SELECTED_INT_KIND(ik) - IF(k.LT.0) EXIT - IF(k.GT.list_ikinds(num_ikinds))THEN - num_ikinds = num_ikinds + 1 - list_ikinds(num_ikinds) = k - ENDIF - ENDDO - - DO k = 1, num_ikinds - WRITE(*,'(I0)', ADVANCE='NO') list_ikinds(k) - IF(k.NE.num_ikinds)THEN - WRITE(*,'(A)',ADVANCE='NO') ',' - ELSE - WRITE(*,'()') - ENDIF - ENDDO - - ! Find real KINDs - list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1) - max_decimal_prec = 1 - - prec: DO ik = 2, 36 - exp: DO jk = 1, 17000 - k = SELECTED_REAL_KIND(ik,jk) - IF(k.LT.0) EXIT exp - IF(k.GT.list_rkinds(num_rkinds))THEN - num_rkinds = num_rkinds + 1 - list_rkinds(num_rkinds) = k - ENDIF - max_decimal_prec = ik - ENDDO exp - ENDDO prec - - DO k = 1, num_rkinds - WRITE(*,'(I0)', ADVANCE='NO') list_rkinds(k) - IF(k.NE.num_rkinds)THEN - WRITE(*,'(A)',ADVANCE='NO') ',' - ELSE - WRITE(*,'()') - ENDIF - ENDDO - - WRITE(*,'(I0)') max_decimal_prec - WRITE(*,'(I0)') num_ikinds - WRITE(*,'(I0)') num_rkinds - - END PROGRAM main - " + "${CODE}" XX YY PROG_OUTPUT @@ -210,6 +134,7 @@ FORTRAN_RUN("REAL and INTEGER KINDs" # dnl -- LINE 4 -- number of valid integer kinds # dnl -- LINE 5 -- number of valid real kinds +file(READ "${CMAKE_BINARY_DIR}/pac_fconftest.out" PROG_OUTPUT) # Convert the string to a list of strings by replacing the carriage return with a semicolon string(REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index 3dce88e..d7e2591 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -10,7 +10,7 @@ set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) # handle input parameters to script. #INSTALLDIR - HDF5 root folder -#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo +#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo #CTEST_SOURCE_NAME - name of source folder; HDF4Examples #STATIC_LIBRARIES - Default is YES #FORTRAN_LIBRARIES - Default is NO @@ -30,8 +30,8 @@ endif() if(NOT DEFINED INSTALLDIR) set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") endif() -if(NOT DEFINED CTEST_BUILD_CONFIGURATION) - set(CTEST_BUILD_CONFIGURATION "Release") +if(NOT DEFINED CTEST_CONFIGURATION_TYPE) + set(CTEST_CONFIGURATION_TYPE "Release") endif() if(NOT DEFINED CTEST_SOURCE_NAME) set(CTEST_SOURCE_NAME "HDF5Examples") @@ -154,7 +154,7 @@ if(NOT N EQUAL 0) 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}\"" + "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"" ) #----------------------------------------------------------------------------- diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in index 4c4ffd5..7ab3c35 100644 --- a/config/cmake/README.txt.cmake.in +++ b/config/cmake/README.txt.cmake.in @@ -40,7 +40,7 @@ To test the installation with the examples; 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 + with the CTEST_CONFIGURATION_TYPE 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". diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 8e88aea..176547b 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -22,7 +22,7 @@ set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE) set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE) -set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE) +set (ALLOW_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE) set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE) @@ -56,7 +56,7 @@ set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libr set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE) -set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE) +set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT SVN TGZ)" FORCE) set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ) set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE) diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake index 2bebcf2..b605f58 100644 --- a/config/cmake/mccacheinit.cmake +++ b/config/cmake/mccacheinit.cmake @@ -34,7 +34,7 @@ set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE) set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE) -set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE) +set (ALLOW_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE) set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE) @@ -75,7 +75,7 @@ set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FO set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE) -set (CTEST_BUILD_CONFIGURATION "Debug" CACHE STRING "Build Debug" FORCE) +set (CTEST_CONFIGURATION_TYPE "Debug" CACHE STRING "Build Debug" FORCE) set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE) diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index 403eedd..8a08caa 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -208,14 +208,14 @@ 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}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${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}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
endif()
endif()
@@ -231,7 +231,7 @@ foreach(v CTEST_SOURCE_DIRECTORY
CTEST_BINARY_DIRECTORY
CTEST_CMAKE_GENERATOR
- CTEST_BUILD_CONFIGURATION
+ CTEST_CONFIGURATION_TYPE
CTEST_GIT_COMMAND
CTEST_CHECKOUT_COMMAND
CTEST_CONFIGURE_COMMAND
@@ -294,7 +294,7 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") ##-----------------------------------------------
## Package the product
##-----------------------------------------------
- execute_process(COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION} -V
+ execute_process(COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
RESULT_VARIABLE cpackResult
OUTPUT_VARIABLE cpackLog
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 4ab9650..672026f 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) # VS201264 * Visual Studio 11 2012 Win64
#
# INSTALLDIR - root folder where hdf5 is installed
-# CTEST_BUILD_CONFIGURATION - Release, Debug, etc
+# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
# CTEST_SOURCE_NAME - source folder
# STATIC_LIBRARIES - Build/use static libraries
# FORTRAN_LIBRARIES - Build/use fortran libraries
@@ -34,7 +34,7 @@ set(CTEST_SOURCE_VERSEXT "") # handle input parameters to script.
#BUILD_GENERATOR - which CMake generator to use, required
#INSTALLDIR - HDF5-1.10.0 root folder
-#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
+#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF5-1.10.0
#STATIC_LIBRARIES - Default is YES
#FORTRAN_LIBRARIES - Default is NO
@@ -82,8 +82,8 @@ if(NOT DEFINED INSTALLDIR) set(INSTALLDIR "/usr/local/myhdf5")
endif()
endif()
-if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
- set(CTEST_BUILD_CONFIGURATION "Release")
+if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
+ set(CTEST_CONFIGURATION_TYPE "Release")
endif()
if(NOT DEFINED CTEST_SOURCE_NAME)
set(CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index cfda66b..5a14990 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -484,6 +484,13 @@ if (NOT WINDOWS) endif (NOT CYGWIN AND NOT MINGW) CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGWINSZ) CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGETD) + + # ---------------------------------------------------------------------- + # cygwin user credentials are different then on linux + # + if (NOT CYGWIN AND NOT MINGW) + CHECK_FUNCTION_EXISTS (getpwuid ${HDF_PREFIX}_HAVE_GETPWUID) + endif (NOT CYGWIN AND NOT MINGW) endif (NOT WINDOWS) #----------------------------------------------------------------------------- @@ -497,12 +504,17 @@ CHECK_FUNCTION_EXISTS (frexpf ${HDF_PREFIX}_HAVE_FREXPF) CHECK_FUNCTION_EXISTS (frexpl ${HDF_PREFIX}_HAVE_FREXPL) CHECK_FUNCTION_EXISTS (gethostname ${HDF_PREFIX}_HAVE_GETHOSTNAME) -CHECK_FUNCTION_EXISTS (getpwuid ${HDF_PREFIX}_HAVE_GETPWUID) CHECK_FUNCTION_EXISTS (getrusage ${HDF_PREFIX}_HAVE_GETRUSAGE) +CHECK_FUNCTION_EXISTS (llround ${HDF_PREFIX}_HAVE_LLROUND) +CHECK_FUNCTION_EXISTS (llroundf ${HDF_PREFIX}_HAVE_LLROUNDF) +CHECK_FUNCTION_EXISTS (lround ${HDF_PREFIX}_HAVE_LROUND) +CHECK_FUNCTION_EXISTS (lroundf ${HDF_PREFIX}_HAVE_LROUNDF) CHECK_FUNCTION_EXISTS (lstat ${HDF_PREFIX}_HAVE_LSTAT) CHECK_FUNCTION_EXISTS (rand_r ${HDF_PREFIX}_HAVE_RAND_R) CHECK_FUNCTION_EXISTS (random ${HDF_PREFIX}_HAVE_RANDOM) +CHECK_FUNCTION_EXISTS (round ${HDF_PREFIX}_HAVE_ROUND) +CHECK_FUNCTION_EXISTS (roundf ${HDF_PREFIX}_HAVE_ROUNDF) CHECK_FUNCTION_EXISTS (setsysinfo ${HDF_PREFIX}_HAVE_SETSYSINFO) CHECK_FUNCTION_EXISTS (signal ${HDF_PREFIX}_HAVE_SIGNAL) @@ -554,7 +566,6 @@ if (NOT WINDOWS) HAVE_C99_DESIGNATED_INITIALIZER SYSTEM_SCOPE_THREADS HAVE_SOCKLEN_T - CXX_HAVE_OFFSETOF ) HDF_FUNCTION_TEST (${test}) endforeach (test) @@ -618,6 +629,7 @@ if (CMAKE_CXX_COMPILER_LOADED) ${HDF_PREFIX}_NO_STD BOOL_NOTDEFINED NO_STATIC_CAST + CXX_HAVE_OFFSETOF ) HDF_CXX_FUNCTION_TEST (${test}) endforeach (test) diff --git a/config/cmake_ext_mod/HDFCXXTests.cpp b/config/cmake_ext_mod/HDFCXXTests.cpp index 6b47421..f5f6644 100644 --- a/config/cmake_ext_mod/HDFCXXTests.cpp +++ b/config/cmake_ext_mod/HDFCXXTests.cpp @@ -54,3 +54,38 @@ int main(void) { } #endif + +#ifdef CXX_HAVE_OFFSETOF + +#include <stdio.h> +#include <stddef.h> + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus +extern "C" +# endif +int FC_DUMMY_MAIN() +{ return 1;} +#endif +#endif +int +main () +{ + + struct index_st + { + unsigned char type; + unsigned char num; + unsigned int len; + }; + typedef struct index_st index_t; + int x,y; + x = offsetof(struct index_st, len); + y = offsetof(index_t, num) + + ; + return 0; +} + +#endif diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index b2c4997..1d6b49a 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -279,3 +279,13 @@ macro (HDF_README_PROPERTIES target_fortran) ${CMAKE_BINARY_DIR}/README.txt @ONLY ) endmacro (HDF_README_PROPERTIES) + +macro (HDFTEST_COPY_FILE src dest target) + add_custom_command( + OUTPUT "${dest}" + COMMAND "${CMAKE_COMMAND}" + ARGS -E copy_if_different "${src}" "${dest}" + DEPENDS "${src}" + ) + list (APPEND ${target}_list "${dest}") +endmacro () diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c index 8478d1b..648f795 100644 --- a/config/cmake_ext_mod/HDFTests.c +++ b/config/cmake_ext_mod/HDFTests.c @@ -389,55 +389,20 @@ int main(void) } #endif -#ifdef CXX_HAVE_OFFSETOF - -#include <stdio.h> -#include <stddef.h> - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus -extern "C" -# endif -int FC_DUMMY_MAIN() -{ return 1;} -#endif -#endif -int -main () -{ - - struct index_st - { - unsigned char type; - unsigned char num; - unsigned int len; - }; - typedef struct index_st index_t; - int x,y; - x = offsetof(struct index_st, len); - y = offsetof(index_t, num) - - ; - return 0; -} - -#endif - #ifdef HAVE_IOEO #include <windows.h> typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO); int main () { - PGNSI pGNSI; - pGNSI = (PGNSI) GetProcAddress( - GetModuleHandle(TEXT("kernel32.dll")), + PGNSI pGNSI; + pGNSI = (PGNSI) GetProcAddress( + GetModuleHandle(TEXT("kernel32.dll")), "InitOnceExecuteOnce"); - if(NULL == pGNSI) - return 1; - else - return 0; + if(NULL == pGNSI) + return 1; + else + return 0; } #endif /* HAVE_IOEO */ diff --git a/config/i386-pc-cygwin32 b/config/cygwin index 93a8d29..7423403 100644 --- a/config/i386-pc-cygwin32 +++ b/config/cygwin @@ -1,4 +1,4 @@ -# -*- shell-script -*- +# -*- shell-script -*- # # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. @@ -20,12 +20,5 @@ # # See BlankForm in this directory for details. -# The default compiler is `gcc'. -if test "X-" = "X-$CC"; then - CC=gcc - CC_BASENAME=gcc - LD=ld -fi - -# Figure out compiler flags -. $srcdir/config/gnu-flags +# Use the linux-gnulibc1 file. +. $srcdir/config/linux-gnulibc1 diff --git a/config/i686-pc-cygwin b/config/i686-pc-cygwin deleted file mode 100644 index 7355e4a..0000000 --- a/config/i686-pc-cygwin +++ /dev/null @@ -1,137 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. - - -# This file is part of the HDF5 build script. It is processed shortly -# after configure starts and defines, among other things, flags for -# the various compile modes. -# -# See BlankForm in this directory for details. - -# The default compiler is `gcc'. -if test -z "$CC"; then - CC=gcc - CC_BASENAME=gcc -fi - -# Figure out GNU C compiler flags -. $srcdir/config/gnu-flags - -# Figure out PGI C compiler flags -. $srcdir/config/pgi-flags - -# Figure out Intel C compiler flags -. $srcdir/config/intel-flags - -# The default Fortran 90 compiler -if test "X-" = "X-$FC"; then - case $CC_BASENAME in - gcc*) - FC=gfortran - FCLIBS=-lgcc - FC_BASENAME=gfortran - ;; - pgcc*) - FC=pgf90 - FC_BASENAME=pgf90 - ;; - icc*) - FC=ifort - FC_BASENAME=ifort - ;; - mpicc*) - FC=mpif90 - FC_BASENAME=mpif90 - ;; - esac -else - case $FC in - # The PGI and Intel compilers are automatically detected below - ifc*|ifort*|pgf90*) - ;; - gfortran) - FCLIBS=-lgcc - ;; - g95) - FCLIBS=-lgcc - ;; - *) - # Figure out which compiler we are using: pgf90 or Absoft f95 - RM='rm -f' - tmpfile=/tmp/cmpver.$$ - $FC -V >$tmpfile - if test -s "$tmpfile"; then - if( grep -s 'Absoft' $tmpfile > /dev/null) then - FC_BASENAME=f95 - fi - if( grep -s 'pgf90' $tmpfile > /dev/null) then - FC_BASENAME=pgf90 - fi - fi - $RM $tmpfile - ;; - esac -fi - -# Figure out PGI F90 compiler flags -. $srcdir/config/pgi-fflags - -# Figure out Intel F90 compiler flags -. $srcdir/config/intel-fflags - -case $FC_BASENAME in - # - # Absoft compiler - # - f95) - # Set required flag for compiling C stubs - H5_CFLAGS="$H5_CFLAGS -DH5_ABSOFT" - - F9XSUFFIXFLAG="" -# We force compiler to use upper case for external names -# (just in case since this should be a default EIP) - H5_FCFLAGS="$H5_FCFLAGS -YEXT_NAMES=UCS" - FSEARCH_DIRS="" - - # Production - PROD_FCFLAGS= - - # Debug - DEBUG_FCFLAGS= - - # Symbols - SYMBOLS_FCFLAGS="-g" - NO_SYMBOLS_FCFLAGS="-s" - - # Profiling - PROFILE_FCFLAGS="-pg" - - # Optimization - HIGH_OPT_FCFLAGS="-O" - DEBUG_OPT_FCFLAGS= - NO_OPT_FCFLAGS= - - f9x_flags_set=yes - ;; - -esac - -# The default C++ compiler - -# The default compiler is `g++'. -if test -z "$CXX"; then - CXX=g++ - CXX_BASENAME=g++ -fi diff --git a/config/x86_64-pc-cygwin b/config/x86_64-pc-cygwin deleted file mode 100644 index 210aa2b..0000000 --- a/config/x86_64-pc-cygwin +++ /dev/null @@ -1,138 +0,0 @@ -# -*- shell-script -*- -# -# Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -# access to either file, you may request a copy from help@hdfgroup.org. - - -# This file is part of the HDF5 build script. It is processed shortly -# after configure starts and defines, among other things, flags for -# the various compile modes. -# -# See BlankForm in this directory for details. - -# The default compiler is `gcc'. -if test -z "$CC"; then - CC=gcc - CC_BASENAME=gcc -fi - -# Figure out GNU C compiler flags -. $srcdir/config/gnu-flags - -# Figure out PGI C compiler flags -. $srcdir/config/pgi-flags - -# Figure out Intel C compiler flags -. $srcdir/config/intel-flags - -# The default Fortran 90 compiler -if test "X-" = "X-$FC"; then - case $CC_BASENAME in - gcc*) - FC=gfortran - FCLIBS=-lgcc - FC_BASENAME=gfortran - ;; - pgcc*) - FC=pgf90 - FC_BASENAME=pgf90 - ;; - icc*) - FC=ifort - FC_BASENAME=ifort - ;; - mpicc*) - FC=mpif90 - FC_BASENAME=mpif90 - ;; - esac -else - case $FC in - # The PGI and Intel compilers are automatically detected below - ifc*|ifort*|pgf90*) - ;; - gfortran) - FCLIBS=-lgcc - ;; - g95) - FCLIBS=-lgcc - ;; - *) - # Figure out which compiler we are using: pgf90 or Absoft f95 - RM='rm -f' - tmpfile=/tmp/cmpver.$$ - $FC -V >$tmpfile - if test -s "$tmpfile"; then - if( grep -s 'Absoft' $tmpfile > /dev/null) then - FC_BASENAME=f95 - fi - if( grep -s 'pgf90' $tmpfile > /dev/null) then - FC_BASENAME=pgf90 - fi - fi - $RM $tmpfile - ;; - esac -fi - -# Figure out PGI F90 compiler flags -. $srcdir/config/pgi-fflags - -# Figure out Intel F90 compiler flags -. $srcdir/config/intel-fflags - -case $FC_BASENAME in - # - # Absoft compiler - # - f95) - # Set required flag for compiling C stubs - H5_CFLAGS="$H5_CFLAGS -DH5_ABSOFT" - - F9XSUFFIXFLAG="" -# We force compiler to use upper case for external names -# (just in case since this should be a default EIP) - H5_FCFLAGS="$H5_FCFLAGS -YEXT_NAMES=UCS" - FSEARCH_DIRS="" - - # Production - PROD_FCFLAGS= - - # Debug - DEBUG_FCFLAGS= - - # Symbols - SYMBOLS_FCFLAGS="-g" - NO_SYMBOLS_FCFLAGS="-s" - - # Profiling - PROFILE_FCFLAGS="-pg" - - # Optimization - HIGH_OPT_FCFLAGS="-O" - DEBUG_OPT_FCFLAGS= - NO_OPT_FCFLAGS= - - f9x_flags_set=yes - ;; - -esac - -# The default C++ compiler - -# The default compiler is `g++'. -if test -z "$CXX"; then - CXX=g++ - CXX_BASENAME=g++ -fi - |