summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-10-04 21:36:27 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-10-04 21:36:27 (GMT)
commit342ce6b5894d8d85bcc392ac53a070574f6816c1 (patch)
treecd187d1c35146b50f929660a0c8d767102b53571 /fortran/src
parent155b00d8ff1b9274fefebced5954bfb0f647b4af (diff)
downloadhdf5-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/src')
-rw-r--r--fortran/src/CMakeLists.txt44
1 files changed, 20 insertions, 24 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 21439f1..2af57c1 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -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}")