diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-06-10 17:46:48 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-06-10 17:46:48 (GMT) |
commit | feb14ea872ed5889de014e35c421b37501fbe38a (patch) | |
tree | 28a7eb1eb0961fb3db0f67306fb0efd1cc550258 /config | |
parent | 001f6a53bff1ff0a074e52a31ee9ce3e61a0e7ce (diff) | |
download | hdf5-feb14ea872ed5889de014e35c421b37501fbe38a.zip hdf5-feb14ea872ed5889de014e35c421b37501fbe38a.tar.gz hdf5-feb14ea872ed5889de014e35c421b37501fbe38a.tar.bz2 |
[svn-r23745] HDFFV-8461: Add Windows /MT support
This adds the UserMacros.cmake support needed.
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/HDFMacros.cmake | 57 |
1 files changed, 52 insertions, 5 deletions
diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake index 099b97f..e9e9665 100644 --- a/config/cmake/HDFMacros.cmake +++ b/config/cmake/HDFMacros.cmake @@ -121,20 +121,67 @@ MACRO (HDF_SET_LIB_OPTIONS libtarget libname libtype) ENDMACRO (HDF_SET_LIB_OPTIONS) #------------------------------------------------------------------------------- -MACRO (TARGET_FORTRAN_WIN_PROPERTIES forttarget addlinkflags) - IF (WIN32 AND MSVC) +MACRO (TARGET_C_PROPERTIES wintarget addcompileflags addlinkflags) + IF (MSVC) + TARGET_MSVC_PROPERTIES (${wintarget} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}") + ELSE (MSVC) IF (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (${wintarget} + PROPERTIES + COMPILE_FLAGS "${addcompileflags}" + LINK_FLAGS "${addlinkflags}" + ) + ELSE (BUILD_SHARED_LIBS) SET_TARGET_PROPERTIES (${forttarget} PROPERTIES - COMPILE_FLAGS "/dll" + COMPILE_FLAGS "${addcompileflags}" + LINK_FLAGS "${addlinkflags}" + ) + ENDIF (BUILD_SHARED_LIBS) + ENDIF (MSVC) +ENDMACRO (TARGET_C_PROPERTIES) + +#------------------------------------------------------------------------------- +MACRO (TARGET_MSVC_PROPERTIES wintarget addcompileflags addlinkflags) + IF (MSVC) + IF (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (${wintarget} + PROPERTIES + COMPILE_FLAGS "/dll ${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}" ) ELSE (BUILD_SHARED_LIBS) SET_TARGET_PROPERTIES (${forttarget} PROPERTIES - COMPILE_FLAGS "/MD" + COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}" ) ENDIF (BUILD_SHARED_LIBS) - ENDIF (WIN32 AND MSVC) + ENDIF (MSVC) +ENDMACRO (TARGET_MSVC_PROPERTIES) + +#------------------------------------------------------------------------------- +MACRO (TARGET_FORTRAN_PROPERTIES forttarget addcompileflags addlinkflags) + IF (WIN32) + TARGET_FORTRAN_WIN_PROPERTIES (${forttarget} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}") + ENDIF (WIN32) +ENDMACRO (TARGET_FORTRAN_PROPERTIES) + +#------------------------------------------------------------------------------- +MACRO (TARGET_FORTRAN_WIN_PROPERTIES forttarget addcompileflags addlinkflags) + IF (MSVC) + IF (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (${forttarget} + PROPERTIES + COMPILE_FLAGS "/dll ${addcompileflags}" + LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}" + ) + ELSE (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (${forttarget} + PROPERTIES + COMPILE_FLAGS "${addcompileflags}" + LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}" + ) + ENDIF (BUILD_SHARED_LIBS) + ENDIF (MSVC) ENDMACRO (TARGET_FORTRAN_WIN_PROPERTIES) |