1- # Copyright (c) 2010, 2016 , Oracle and/or its affiliates. All rights reserved.
1+ # Copyright (c) 2010, 2017 , Oracle and/or its affiliates. All rights reserved.
22#
33# This program is free software; you can redistribute it and/or modify
44# it under the terms of the GNU General Public License as published by
@@ -75,7 +75,6 @@ IF(MSVC)
7575 ENDFOREACH ()
7676
7777 # For release types Debug Release RelWithDebInfo (but not MinSizeRel):
78- # - Force static runtime libraries
7978 # - Choose C++ exception handling:
8079 # If /EH is not specified, the compiler will catch structured and
8180 # C++ exceptions, but will not destroy C++ objects that will go out of
@@ -98,20 +97,20 @@ IF(MSVC)
9897 FOREACH (lang C CXX)
9998 SET (CMAKE_${lang} _FLAGS_RELEASE "${CMAKE_${lang} _FLAGS_RELEASE} /Z7" )
10099 ENDFOREACH ()
101- IF ( NOT WINDOWS_RUNTIME_MD)
100+
102101 FOREACH (flag
103102 CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
104103 CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
105104 CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
106105 CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
107- STRING (REPLACE "/MD" "/MT" "${flag} " "${${flag} }" )
106+ # Disable this substitution, use default, which is /MD
107+ # STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
108108 STRING (REPLACE "/Zi" "/Z7" "${flag} " "${${flag} }" )
109109 IF (NOT WIN_DEBUG_NO_INLINE)
110110 STRING (REPLACE "/Ob0" "/Ob1" "${flag} " "${${flag} }" )
111111 ENDIF ()
112112 SET ("${flag} " "${${flag} } /EHsc" )
113113 ENDFOREACH ()
114- ENDIF ()
115114
116115 # Fix CMake's predefined huge stack size
117116 FOREACH (type EXE SHARED MODULE)
0 commit comments