[svn-r19509] Improve CMake support for CYGWIN.

Correct script comment in testh5diff.sh

Tested: Windows Cygwin
This commit is contained in:
Allen Byrne 2010-10-04 16:36:27 -05:00
parent 155b00d8ff
commit 342ce6b589
14 changed files with 169 additions and 159 deletions

View File

@ -222,9 +222,9 @@ INCLUDE (${HDF5_RESOURCES_DIR}/ConfigureChecks.cmake)
#-----------------------------------------------------------------------------
# Option to use legacy naming for windows libs/programs, default is legacy
#-----------------------------------------------------------------------------
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
OPTION (H5_LEGACY_NAMING "Use Legacy Names for Libraries and Programs" ON)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
#-----------------------------------------------------------------------------
# Option to Build Shared/Static libs, default is static
@ -284,8 +284,10 @@ ENDIF (HDF5_ENABLE_COVERAGE)
SET (EXE_EXT "")
IF (WIN32)
SET (EXE_EXT ".exe")
ADD_DEFINITIONS (-DBIND_TO_CURRENT_VCLIBS_VERSION=1)
ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS)
IF (NOT CYGWIN)
ADD_DEFINITIONS (-DBIND_TO_CURRENT_VCLIBS_VERSION=1)
ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS)
ENDIF (NOT CYGWIN)
ENDIF (WIN32)
SET (MAKE_SYSTEM)
@ -345,9 +347,9 @@ IF (HDF5_DISABLE_COMPILER_WARNINGS)
CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w")
ENDIF (MSVC)
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
# Borland uses -w- to suppress warnings.
IF (BORLAND)
SET (HDF5_WARNINGS_BLOCKED 1)
@ -558,7 +560,7 @@ ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
#-----------------------------------------------------------------------------
# Option for external libraries on windows
#-----------------------------------------------------------------------------
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
OPTION (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF)
IF (BUILD_SHARED_LIBS)
FILE (MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BLDTYPE})
@ -586,19 +588,19 @@ IF (WIN32)
ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
ENDIF (BUILD_SHARED_LIBS)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
#-----------------------------------------------------------------------------
# Option to use threadsafe
# Note: Currently CMake only allows configuring of threadsafe on WINDOWS.
#-----------------------------------------------------------------------------
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
OPTION (HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF)
IF (HDF5_ENABLE_THREADSAFE)
SET (H5_HAVE_WIN_THREADS 1)
SET (H5_HAVE_THREADSAFE 1)
ENDIF (HDF5_ENABLE_THREADSAFE)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
#-----------------------------------------------------------------------------
# Option to use PACKED BITS SUPPORT

View File

@ -100,40 +100,8 @@ IF (HDF5_ENABLE_CODESTACK)
ENDIF (HDF5_ENABLE_CODESTACK)
MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
#IF (WIN32)
# SET (DEFAULT_STREAM_VFD OFF)
#ELSE (WIN32)
# SET (DEFAULT_STREAM_VFD ON)
#ENDIF (WIN32)
#OPTION (HDF5_STREAM_VFD "Compile Stream Virtual File Driver support" ${DEFAULT_STREAM_VFD})
OPTION (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
SET (WINDOWS)
IF (WIN32)
IF (NOT UNIX)
SET (WINDOWS 1)
ENDIF (NOT UNIX)
ENDIF (WIN32)
# TODO --------------------------------------------------------------------------
# Should the Default Virtual File Driver be compiled?
# This is hard-coded now but option should added to match configure
#
IF (WINDOWS)
SET (H5_HAVE_WINDOWS 1)
# SET (H5_WINDOWS_USE_STDIO 0)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine has window style pathname,
# that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/").
# (This flag should be _unset_ for all machines, except for Windows)
#
SET (H5_HAVE_WINDOW_PATH 1)
SET (WINDOWS_MAX_BUF (1024 * 1024 * 1024))
SET (H5_DEFAULT_VFD H5FD_WINDOWS)
ELSE (WINDOWS)
SET (H5_DEFAULT_VFD H5FD_SEC2)
ENDIF (WINDOWS)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can handle converting
# floating-point to long long values.
@ -156,14 +124,89 @@ MACRO (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
ENDIF (${VARIABLE})
ENDMACRO (CHECK_LIBRARY_EXISTS_CONCAT)
# ----------------------------------------------------------------------
# WINDOWS Hard code Values
# ----------------------------------------------------------------------
SET (WINDOWS)
IF (WIN32)
IF (NOT UNIX AND NOT CYGWIN)
SET (WINDOWS 1)
ENDIF (NOT UNIX AND NOT CYGWIN)
ENDIF (WIN32)
#IF (WIN32)
# SET (DEFAULT_STREAM_VFD OFF)
#ELSE (WIN32)
# SET (DEFAULT_STREAM_VFD ON)
#ENDIF (WIN32)
#OPTION (HDF5_STREAM_VFD "Compile Stream Virtual File Driver support" ${DEFAULT_STREAM_VFD})
# TODO --------------------------------------------------------------------------
# Should the Default Virtual File Driver be compiled?
# This is hard-coded now but option should added to match configure
#
IF (WINDOWS)
SET (H5_HAVE_WINDOWS 1)
# SET (H5_WINDOWS_USE_STDIO 0)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine has window style pathname,
# that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/").
# (This flag should be _unset_ for all machines, except for Windows)
#
SET (H5_HAVE_WINDOW_PATH 1)
SET (WINDOWS_MAX_BUF (1024 * 1024 * 1024))
SET (H5_DEFAULT_VFD H5FD_WINDOWS)
ELSE (WINDOWS)
SET (H5_DEFAULT_VFD H5FD_SEC2)
ENDIF (WINDOWS)
#-----------------------------------------------------------------------------
# Check for some functions that are used
IF (WINDOWS)
SET (H5_HAVE_IO_H 1)
SET (H5_HAVE_SETJMP_H 1)
SET (H5_HAVE_STDDEF_H 1)
SET (H5_HAVE_SYS_STAT_H 1)
SET (H5_HAVE_SYS_TIMEB_H 1)
SET (H5_HAVE_SYS_TYPES_H 1)
SET (H5_HAVE_WINSOCK_H 1)
SET (H5_HAVE_LIBM 1)
SET (H5_HAVE_STRDUP 1)
SET (H5_HAVE_SYSTEM 1)
SET (H5_HAVE_DIFFTIME 1)
SET (H5_HAVE_LONGJMP 1)
SET (H5_STDC_HEADERS 1)
SET (H5_HAVE_GETHOSTNAME 1)
SET (H5_HAVE_TIMEZONE 1)
SET (H5_HAVE_FUNCTION 1)
SET (H5_LONE_COLON 0)
ENDIF (WINDOWS)
#-----------------------------------------------------------------------------
# These tests need to be manually SET for windows since there is currently
# something not quite correct with the actual test implementation. This affects
# the 'dt_arith' test and most likely lots of other code
# ----------------------------------------------------------------------------
IF (WINDOWS)
SET (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "" CACHE INTERNAL "")
ENDIF (WINDOWS)
# ----------------------------------------------------------------------
# END of WINDOWS Hard code Values
# ----------------------------------------------------------------------
IF (CYGWIN)
SET (H5_HAVE_LSEEK64 0)
ENDIF (CYGWIN)
#-----------------------------------------------------------------------------
# Check for the math library "m"
#-----------------------------------------------------------------------------
IF (WINDOWS)
SET (H5_HAVE_LIBM 1)
ELSE (WINDOWS)
IF (NOT WINDOWS)
CHECK_LIBRARY_EXISTS_CONCAT ("m" printf H5_HAVE_LIBM)
ENDIF (WINDOWS)
ENDIF (NOT WINDOWS)
CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" printf H5_HAVE_LIBWS2_32)
CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" printf H5_HAVE_LIBWSOCK32)
#CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen H5_HAVE_LIBDL)
@ -188,19 +231,6 @@ MACRO (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
ENDIF (${VARIABLE})
ENDMACRO (CHECK_INCLUDE_FILE_CONCAT)
#-----------------------------------------------------------------------------
# If we are on Windows we know some of the answers to these tests already
#-----------------------------------------------------------------------------
IF (WINDOWS)
SET (H5_HAVE_IO_H 1)
SET (H5_HAVE_SETJMP_H 1)
SET (H5_HAVE_STDDEF_H 1)
SET (H5_HAVE_SYS_STAT_H 1)
SET (H5_HAVE_SYS_TIMEB_H 1)
SET (H5_HAVE_SYS_TYPES_H 1)
SET (H5_HAVE_WINSOCK_H 1)
ENDIF (WINDOWS)
#-----------------------------------------------------------------------------
# Check for the existence of certain header files
#-----------------------------------------------------------------------------
@ -235,9 +265,11 @@ CHECK_INCLUDE_FILE_CONCAT ("memory.h" H5_HAVE_MEMORY_H)
CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" H5_HAVE_DLFCN_H)
CHECK_INCLUDE_FILE_CONCAT ("features.h" H5_HAVE_FEATURES_H)
CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" H5_HAVE_INTTYPES_H)
CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" H5_HAVE_WINSOCK_H)
CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" H5_HAVE_NETINET_IN_H)
IF (NOT CYGWIN)
CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" H5_HAVE_WINSOCK_H)
ENDIF (NOT CYGWIN)
# IF the c compiler found stdint, check the C++ as well. On some systems this
# file will be found by C but not C++, only do this test IF the C++ compiler
@ -286,7 +318,6 @@ MACRO (H5_CHECK_TYPE_SIZE type var)
ENDMACRO (H5_CHECK_TYPE_SIZE)
H5_CHECK_TYPE_SIZE (char H5_SIZEOF_CHAR)
H5_CHECK_TYPE_SIZE (short H5_SIZEOF_SHORT)
H5_CHECK_TYPE_SIZE (int H5_SIZEOF_INT)
@ -346,15 +377,7 @@ SET (CMAKE_REQUIRED_LIBRARIES ${LINK_LIBS})
#-----------------------------------------------------------------------------
# Check for some functions that are used
IF (WINDOWS)
SET (H5_HAVE_STRDUP 1)
SET (H5_HAVE_SYSTEM 1)
SET (H5_HAVE_DIFFTIME 1)
SET (H5_HAVE_LONGJMP 1)
SET (H5_STDC_HEADERS 1)
SET (H5_HAVE_GETHOSTNAME 1)
ENDIF (WINDOWS)
#
CHECK_FUNCTION_EXISTS (alarm H5_HAVE_ALARM)
CHECK_FUNCTION_EXISTS (fork H5_HAVE_FORK)
CHECK_FUNCTION_EXISTS (frexpf H5_HAVE_FREXPF)
@ -517,11 +540,7 @@ ENDMACRO (HDF5_FUNCTION_TEST)
#-----------------------------------------------------------------------------
# Check a bunch of other functions
#-----------------------------------------------------------------------------
IF (WINDOWS)
SET (H5_HAVE_TIMEZONE 1)
SET (H5_HAVE_FUNCTION 1)
SET (H5_LONE_COLON 0)
ELSE (WINDOWS)
IF (NOT WINDOWS)
FOREACH (test
TIME_WITH_SYS_TIME
STDC_HEADERS
@ -530,7 +549,7 @@ ELSE (WINDOWS)
HAVE_ATTRIBUTE
HAVE_FUNCTION
HAVE_TM_GMTOFF
HAVE_TIMEZONE
# HAVE_TIMEZONE
HAVE_STRUCT_TIMEZONE
HAVE_STAT_ST_BLOCKS
HAVE_FUNCTION
@ -546,8 +565,12 @@ ELSE (WINDOWS)
LONE_COLON
)
HDF5_FUNCTION_TEST (${test})
IF (NOT CYGWIN)
HDF5_FUNCTION_TEST (HAVE_TIMEZONE)
# HDF5_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
ENDIF (NOT CYGWIN)
ENDFOREACH (test)
ENDIF (WINDOWS)
ENDIF (NOT WINDOWS)
#-----------------------------------------------------------------------------
# Option to see if GPFS is available on this filesystem --enable-gpfs
@ -645,9 +668,6 @@ SET (H5_CONVERT_DENORMAL_FLOAT 1)
IF (HDF5_ENABLE_HSIZET)
SET (H5_HAVE_LARGE_HSIZET 1)
ENDIF (HDF5_ENABLE_HSIZET)
IF (CYGWIN)
SET (H5_HAVE_LSEEK64 0)
ENDIF (CYGWIN)
#-----------------------------------------------------------------------------
# Macro to determine the various conversion capabilities
@ -821,11 +841,8 @@ H5ConversionTests (H5_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly convertin
H5ConversionTests (H5_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values")
H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced")
#-----------------------------------------------------------------------------
# These tests need to be manually SET for windows since there is currently
# something not quite correct with the actual test implementation. This affects
# the 'dt_arith' test and most likely lots of other code
# ----------------------------------------------------------------------------
IF (WINDOWS)
SET (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "" CACHE INTERNAL "")
ENDIF (WINDOWS)
# Define a macro for Cygwin (on XP only) where the compiler has rounding
# problem converting from unsigned long long to long double */
IF (CYGWIN)
SET (H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM 1)
ENDIF (CYGWIN)

View File

@ -39,6 +39,10 @@
/* Define if C++ compiler recognizes offsetof */
#cmakedefine H5_CXX_HAVE_OFFSETOF @H5_CXX_HAVE_OFFSETOF@
/* Define a macro for Cygwin (on XP only) where the compiler has rounding
problem converting from unsigned long long to long double */
#cmakedefine H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM @H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM@
/* Define the default virtual file driver to compile */
#cmakedefine H5_DEFAULT_VFD @H5_DEFAULT_VFD@

View File

@ -9,8 +9,8 @@ int main(int argc, char *argv[]) {
FILE *outfile = NULL;
char *buffer = NULL;
char argbuf[8];
unsigned int bytes = 0;
unsigned int idx = 0;
size_t bytes = 0;
size_t idx = 0;
unsigned int lineidx = 0;
unsigned int stripXlines = 3;

View File

@ -39,12 +39,12 @@ FOREACH (example ${examples})
ADD_EXECUTABLE (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
H5_NAMING (f90_ex_${example})
TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_${example})
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET f90_ex_${example}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
TARGET_LINK_LIBRARIES (f90_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@ -56,12 +56,12 @@ IF (H5_HAVE_PARALLEL)
ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
H5_NAMING (f90_ex_ph5example)
TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example)
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET f90_ex_ph5example
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
TARGET_LINK_LIBRARIES (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}

View File

@ -25,20 +25,18 @@ ELSE (FORTRAN_HAVE_SIZEOF)
${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90
)
ENDIF (FORTRAN_HAVE_SIZEOF)
IF (WIN32)
IF (MSVC)
IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (H5test_FortranHavekind
PROPERTIES
COMPILE_FLAGS "/MT"
)
ENDIF (BUILD_SHARED_LIBS)
IF (WIN32 AND MSVC)
IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (H5test_FortranHavekind
PROPERTIES
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
COMPILE_FLAGS "/MT"
)
ENDIF (MSVC)
ENDIF (WIN32)
ENDIF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (H5test_FortranHavekind
PROPERTIES
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran)
SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5test_FortranHavekind${EXE_EXT})
@ -53,20 +51,18 @@ ADD_CUSTOM_COMMAND (
ADD_EXECUTABLE (H5fortran_detect
${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
)
IF (WIN32)
IF (MSVC)
IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (H5fortran_detect
PROPERTIES
COMPILE_FLAGS "/MT"
)
ENDIF (BUILD_SHARED_LIBS)
IF (WIN32 AND MSVC)
IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (H5fortran_detect
PROPERTIES
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
COMPILE_FLAGS "/MT"
)
ENDIF (MSVC)
ENDIF (WIN32)
ENDIF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (H5fortran_detect
PROPERTIES
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran)
SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5fortran_detect${EXE_EXT})
@ -188,7 +184,7 @@ ENDIF (H5_HAVE_PARALLEL)
# Add Main fortran library
#-----------------------------------------------------------------------------
ADD_LIBRARY (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS})
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
IF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
@ -206,7 +202,7 @@ IF (WIN32)
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET})
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")

View File

@ -30,7 +30,7 @@ ADD_LIBRARY (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.f90)
ADD_DEPENDENCIES(${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_C_TEST_LIB_TARGET}
)
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
IF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
@ -48,7 +48,7 @@ IF (WIN32)
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} ${LIB_TYPE})
@ -81,11 +81,9 @@ TARGET_LINK_LIBRARIES (testhdf5_fortran
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
IF (WIN32)
IF (MSVC)
TARGET_LINK_LIBRARIES (testhdf5_fortran "ws2_32.lib")
ENDIF (MSVC)
ENDIF (WIN32)
IF (WIN32 AND MSVC)
TARGET_LINK_LIBRARIES (testhdf5_fortran "ws2_32.lib")
ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
@ -105,11 +103,9 @@ TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
IF (WIN32)
IF (MSVC)
TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8 "ws2_32.lib")
ENDIF (MSVC)
ENDIF (WIN32)
IF (WIN32 AND MSVC)
TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8 "ws2_32.lib")
ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
@ -123,11 +119,9 @@ TARGET_LINK_LIBRARIES (fflush1
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
)
IF (WIN32)
IF (MSVC)
TARGET_LINK_LIBRARIES (fflush1 "ws2_32.lib")
ENDIF (MSVC)
ENDIF (WIN32)
IF (WIN32 AND MSVC)
TARGET_LINK_LIBRARIES (fflush1 "ws2_32.lib")
ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fflush1 PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
@ -141,11 +135,9 @@ TARGET_LINK_LIBRARIES (fflush2
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
IF (WIN32)
IF (MSVC)
TARGET_LINK_LIBRARIES (fflush2 "ws2_32.lib")
ENDIF (MSVC)
ENDIF (WIN32)
IF (WIN32 AND MSVC)
TARGET_LINK_LIBRARIES (fflush2 "ws2_32.lib")
ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fflush2 PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME fflush2 COMMAND $<TARGET_FILE:fflush2>)

View File

@ -28,11 +28,9 @@ TARGET_LINK_LIBRARIES (parallel_test
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
IF (WIN32)
IF (MSVC)
TARGET_LINK_LIBRARIES (parallel_test "ws2_32.lib")
ENDIF (MSVC)
ENDIF (WIN32)
IF (WIN32 AND MSVC)
TARGET_LINK_LIBRARIES (parallel_test "ws2_32.lib")
ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (parallel_test PROPERTIES LINKER_LANGUAGE Fortran)
ADD_TEST (NAME parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:parallel_test>)

View File

@ -52,7 +52,7 @@ H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_
ADD_LIBRARY (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
IF (BUILD_SHARED_LIBS)
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
BUILD_HDF5_DLL
@ -64,14 +64,14 @@ IF (BUILD_SHARED_LIBS)
LINK_FLAGS "/SUBSYSTEM:CONSOLE /DLL"
)
ENDIF (MSVC)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
ENDIF (BUILD_SHARED_LIBS)
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_HL_F90_LIB_TARGET}
${HDF5_HL_F90_C_LIB_TARGET}

View File

@ -557,10 +557,10 @@ SET (H5_PUBLIC_HEADERS
# --------------------------------------------------------------------
# If we are compiling on Windows then add the windows specific files
# --------------------------------------------------------------------
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
SET (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5FDwindows.c)
SET (H5_PUBLIC_HEADERS ${H5_PUBLIC_HEADERS} ${HDF5_SRC_DIR}/H5FDwindows.h)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
SET (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5private.h

View File

@ -183,6 +183,7 @@ SET (H5_TESTS
dt_arith
dtypes
cmpd_dset
filter_fail
extend
external
objcopy

View File

@ -233,7 +233,7 @@ IF (BUILD_TESTING)
)
ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
IF (WIN32)
IF (WIN32 AND NOT CYGWIN)
ADD_CUSTOM_COMMAND (
TARGET h5diff
POST_BUILD
@ -247,7 +247,7 @@ IF (BUILD_TESTING)
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102w.txt ${PROJECT_BINARY_DIR}/h5diff_102.txt
)
ELSE (WIN32)
ELSE (WIN32 AND NOT CYGWIN)
ADD_CUSTOM_COMMAND (
TARGET h5diff
POST_BUILD
@ -261,7 +261,7 @@ IF (BUILD_TESTING)
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102.txt ${PROJECT_BINARY_DIR}/h5diff_102.txt
)
ENDIF (WIN32)
ENDIF (WIN32 AND NOT CYGWIN)
##############################################################################
##############################################################################

View File

@ -54,10 +54,10 @@ FILE17=h5diff_ext2softlink_src.h5
FILE18=h5diff_ext2softlink_trg.h5
DANGLE_LINK_FILE1=h5diff_danglelinks1.h5
DANGLE_LINK_FILE2=h5diff_danglelinks2.h5
/* group recursive */
# group recursive
GRP_RECURSE_FILE1=h5diff_grp_recurse1.h5
GRP_RECURSE_FILE2=h5diff_grp_recurse2.h5
/* group recursive - same structure via external links through files */
# group recursive - same structure via external links through files
GRP_RECURSE1_EXT=h5diff_grp_recurse_ext1.h5
GRP_RECURSE2_EXT1=h5diff_grp_recurse_ext2-1.h5
GRP_RECURSE2_EXT2=h5diff_grp_recurse_ext2-2.h5

View File

@ -372,17 +372,17 @@ IF (BUILD_TESTING)
ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/tbin1LE.ddl
)
IF (WIN32 AND NOT MINGW)
IF (WIN32 AND NOT CYGWIN)
FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
FILE (WRITE ${PROJECT_BINARY_DIR}/tbinregR.exp "${TEST_STREAM}")
ELSE (WIN32 AND NOT MINGW)
ELSE (WIN32 AND NOT CYGWIN)
ADD_CUSTOM_COMMAND (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/tbinregR.exp
)
ENDIF (WIN32 AND NOT MINGW)
ENDIF (WIN32 AND NOT CYGWIN)
##############################################################################
##############################################################################