mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r19910] Change how LINK_FLAGS for fortran are appended on Windows - correct for just shared libs
This commit is contained in:
parent
02888be7f2
commit
96b2abb9bd
@ -184,19 +184,23 @@ ENDIF (H5_HAVE_PARALLEL)
|
||||
# Add Main fortran library
|
||||
#-----------------------------------------------------------------------------
|
||||
ADD_LIBRARY (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS})
|
||||
TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_LIB_TARGET} "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def")
|
||||
SET (SHARED_LINK_FLAGS "")
|
||||
IF (WIN32 AND NOT CYGWIN)
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
BUILD_HDF5_DLL
|
||||
)
|
||||
IF (MSVC)
|
||||
SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def")
|
||||
ENDIF (MSVC)
|
||||
ENDIF (BUILD_SHARED_LIBS)
|
||||
SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
HDF5F90_WINDOWS
|
||||
)
|
||||
ENDIF (WIN32 AND NOT CYGWIN)
|
||||
TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_LIB_TARGET} ${SHARED_LINK_FLAGS})
|
||||
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}")
|
||||
|
@ -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}
|
||||
)
|
||||
TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} "/DLL")
|
||||
SET (SHARED_LINK_FLAGS "")
|
||||
IF (WIN32 AND NOT CYGWIN)
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET}
|
||||
@ -38,10 +38,7 @@ IF (WIN32 AND NOT CYGWIN)
|
||||
BUILD_HDF5_DLL
|
||||
)
|
||||
IF (MSVC)
|
||||
SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET}
|
||||
APPEND PROPERTY LINK_FLAGS
|
||||
"/DLL"
|
||||
)
|
||||
SET (SHARED_LINK_FLAGS "/DLL")
|
||||
ENDIF (MSVC)
|
||||
ENDIF (BUILD_SHARED_LIBS)
|
||||
SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET}
|
||||
@ -49,6 +46,7 @@ IF (WIN32 AND NOT CYGWIN)
|
||||
HDF5F90_WINDOWS
|
||||
)
|
||||
ENDIF (WIN32 AND NOT CYGWIN)
|
||||
TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} ${SHARED_LINK_FLAGS})
|
||||
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})
|
||||
|
@ -51,13 +51,16 @@ SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT
|
||||
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE})
|
||||
|
||||
ADD_LIBRARY (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
|
||||
TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} "/DLL")
|
||||
SET (SHARED_LINK_FLAGS "")
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
IF (WIN32 AND NOT CYGWIN)
|
||||
SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
BUILD_HDF5_DLL
|
||||
)
|
||||
IF (MSVC)
|
||||
SET (SHARED_LINK_FLAGS "/DLL")
|
||||
ENDIF (MSVC)
|
||||
ENDIF (WIN32 AND NOT CYGWIN)
|
||||
ENDIF (BUILD_SHARED_LIBS)
|
||||
IF (WIN32 AND NOT CYGWIN)
|
||||
@ -66,6 +69,7 @@ IF (WIN32 AND NOT CYGWIN)
|
||||
HDF5F90_WINDOWS
|
||||
)
|
||||
ENDIF (WIN32 AND NOT CYGWIN)
|
||||
TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} ${SHARED_LINK_FLAGS})
|
||||
SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
|
||||
TARGET_LINK_LIBRARIES (${HDF5_HL_F90_LIB_TARGET}
|
||||
${HDF5_HL_F90_C_LIB_TARGET}
|
||||
|
Loading…
Reference in New Issue
Block a user