Skip to content

Commit fbd6a14

Browse files
author
Tor Didriksen
committed
Merge branch 'mysql-5.5' into mysql-5.6
2 parents 3842f22 + 19150f7 commit fbd6a14

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmake/os/Windows.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
@@ -65,6 +65,7 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
6565
ENDIF()
6666

6767
IF(MSVC)
68+
OPTION(LINK_STATIC_RUNTIME_LIBRARIES "Link with /MT" OFF)
6869
# Enable debug info also in Release build,
6970
# and create PDB to be able to analyze crashes.
7071
FOREACH(type EXE SHARED MODULE)
@@ -94,7 +95,9 @@ IF(MSVC)
9495
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
9596
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
9697
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()
98101
STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}")
99102
SET("${flag}" "${${flag}} /EHsc")
100103
ENDFOREACH()

0 commit comments

Comments
 (0)