summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
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>)