diff options
author | Tor Didriksen <tor.didriksen@oracle.com> | 2017-02-24 16:20:14 +0100 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@oracle.com> | 2017-02-27 09:38:00 +0100 |
commit | 19150f7e7ac6e47e67b82c675f13ef1e550d429d (patch) | |
tree | b6c7a23671af52c2d76f6fd709a948608782dc98 | |
parent | 18b3aa112348c0ee3fe89764cbb78a72e29e58d2 (diff) | |
download | mariadb-git-19150f7e7ac6e47e67b82c675f13ef1e550d429d.tar.gz |
Bug#25611609 LINK WITH DYNAMIC RUNTIME LIBRARIES ON WINDOWS
Patch for 5.5 and 5.6
Use default runtime libraries on windows, i.e. build with /MD
-rw-r--r-- | cmake/os/Windows.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake index 1b79970a830..667afc7aabc 100644 --- a/cmake/os/Windows.cmake +++ b/cmake/os/Windows.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -64,6 +64,7 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4) ENDIF() IF(MSVC) + OPTION(LINK_STATIC_RUNTIME_LIBRARIES "Link with /MT" OFF) # Enable debug info also in Release build, # and create PDB to be able to analyze crashes. FOREACH(type EXE SHARED MODULE) @@ -86,7 +87,9 @@ IF(MSVC) CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT) - STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}") + IF(LINK_STATIC_RUNTIME_LIBRARIES) + STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}") + ENDIF() STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}") ENDFOREACH() |