summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDF5Macros.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-09-09 16:30:23 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-09-09 16:30:23 (GMT)
commitbed127641399ec6c6e1479b7c394fd3a4eb56438 (patch)
treebd923e43fb7c5a004a94f038b6c087d1d170f739 /config/cmake/HDF5Macros.cmake
parenta5b16bbd75dddc008480448d458cb0a1b7ba70fa (diff)
downloadhdf5-bed127641399ec6c6e1479b7c394fd3a4eb56438.zip
hdf5-bed127641399ec6c6e1479b7c394fd3a4eb56438.tar.gz
hdf5-bed127641399ec6c6e1479b7c394fd3a4eb56438.tar.bz2
[svn-r19361] Move Windows specific compile and link flags to macros
Diffstat (limited to 'config/cmake/HDF5Macros.cmake')
-rw-r--r--config/cmake/HDF5Macros.cmake36
1 files changed, 36 insertions, 0 deletions
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake
index 8b30fbf..99fbea1 100644
--- a/config/cmake/HDF5Macros.cmake
+++ b/config/cmake/HDF5Macros.cmake
@@ -120,3 +120,39 @@ MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype)
ENDMACRO (H5_SET_LIB_OPTIONS)
+#-------------------------------------------------------------------------------
+MACRO (TARGET_WIN_PROPERTIES target)
+ IF (WIN32)
+ IF (MSVC)
+ IF (NOT BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (${target}
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
+ ENDIF (NOT BUILD_SHARED_LIBS)
+ ENDIF (MSVC)
+ ENDIF (WIN32)
+ENDMACRO (TARGET_WIN_PROPERTIES)
+
+#-------------------------------------------------------------------------------
+MACRO (TARGET_FORTRAN_WIN_PROPERTIES target)
+ IF (WIN32)
+ IF (BUILD_SHARED_LIBS)
+ IF (MSVC)
+ SET_TARGET_PROPERTIES (${target}
+ PROPERTIES
+ COMPILE_FLAGS "/dll"
+ LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ )
+ ENDIF (MSVC)
+ ELSE (BUILD_SHARED_LIBS)
+ IF (MSVC)
+ SET_TARGET_PROPERTIES (${target}
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
+ ENDIF (MSVC)
+ ENDIF (BUILD_SHARED_LIBS)
+ ENDIF (WIN32)
+ENDMACRO (TARGET_FORTRAN_WIN_PROPERTIES)
+