diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-10-04 21:41:03 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-10-04 21:41:03 (GMT) |
commit | 694c9065e06b7518999e9839cb38e1215aa7b39a (patch) | |
tree | 4a81c0076c699b9d33931f71cd383bbc3a201813 /fortran/src/CMakeLists.txt | |
parent | 0574011fe87d79953d44d0824b0d0da5386b9060 (diff) | |
download | hdf5-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/src/CMakeLists.txt')
-rw-r--r-- | fortran/src/CMakeLists.txt | 44 |
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}") |