File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 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.
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
@@ -65,6 +65,7 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
65
65
ENDIF ()
66
66
67
67
IF (MSVC )
68
+ OPTION (LINK_STATIC_RUNTIME_LIBRARIES "Link with /MT" OFF )
68
69
# Enable debug info also in Release build,
69
70
# and create PDB to be able to analyze crashes.
70
71
FOREACH (type EXE SHARED MODULE )
@@ -94,7 +95,9 @@ IF(MSVC)
94
95
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
95
96
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
96
97
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT )
97
- STRING (REPLACE "/MD" "/MT" "${flag} " "${${flag} }" )
98
+ IF (LINK_STATIC_RUNTIME_LIBRARIES )
99
+ STRING (REPLACE "/MD" "/MT" "${flag} " "${${flag} }" )
100
+ ENDIF ()
98
101
STRING (REPLACE "/Zi" "/Z7" "${flag} " "${${flag} }" )
99
102
SET ("${flag} " "${${flag} } /EHsc" )
100
103
ENDFOREACH ()
You can’t perform that action at this time.
0 commit comments