diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-10-04 21:36:27 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-10-04 21:36:27 (GMT) |
commit | 342ce6b5894d8d85bcc392ac53a070574f6816c1 (patch) | |
tree | cd187d1c35146b50f929660a0c8d767102b53571 /fortran/test/CMakeLists.txt | |
parent | 155b00d8ff1b9274fefebced5954bfb0f647b4af (diff) | |
download | hdf5-342ce6b5894d8d85bcc392ac53a070574f6816c1.zip hdf5-342ce6b5894d8d85bcc392ac53a070574f6816c1.tar.gz hdf5-342ce6b5894d8d85bcc392ac53a070574f6816c1.tar.bz2 |
[svn-r19509] Improve CMake support for CYGWIN.
Correct script comment in testh5diff.sh
Tested: Windows Cygwin
Diffstat (limited to 'fortran/test/CMakeLists.txt')
-rw-r--r-- | fortran/test/CMakeLists.txt | 36 |
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>) |