summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-10-04 21:41:03 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-10-04 21:41:03 (GMT)
commit694c9065e06b7518999e9839cb38e1215aa7b39a (patch)
tree4a81c0076c699b9d33931f71cd383bbc3a201813 /fortran/test
parent0574011fe87d79953d44d0824b0d0da5386b9060 (diff)
downloadhdf5-694c9065e06b7518999e9839cb38e1215aa7b39a.zip
hdf5-694c9065e06b7518999e9839cb38e1215aa7b39a.tar.gz
hdf5-694c9065e06b7518999e9839cb38e1215aa7b39a.tar.bz2
[svn-r19510] Improve CMake support for CYGWIN.
Correct script comment in testh5diff.sh Bring r19509 back from trunk Tested: Windows Cygwin
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/CMakeLists.txt36
1 files changed, 14 insertions, 22 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 7c8c407..a536c2e 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -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>)