Skip to content

Commit 86db15e

Browse files
author
Tor Didriksen
committed
Bug#25611359 REMOVE UNDOCUMENTED CMAKE OPTION WINDOWS_RUNTIME_MD
Remove the undocumented WINDOWS_RUNTIME_MD cmake option. Remove /MT from compiler flags, and use default linkage, which is /MD
1 parent a741f41 commit 86db15e

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

cmake/os/Windows.cmake

Lines changed: 4 additions & 5 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
@@ -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)

sql/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2006, 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
@@ -320,9 +320,8 @@ ADD_COMPILE_FLAGS(
320320
COMPILE_FLAGS -DXXH_NAMESPACE=MY_
321321
)
322322

323-
# Fixes "C1128: number of sections exceeded object file format limit" in MSVC /MD
324-
# The flag /bigobj is not added if the build is not WINDOWS_RUNTIME_MD (/MD)
325-
IF(WINDOWS_RUNTIME_MD AND CMAKE_SIZEOF_VOID_P MATCHES 8)
323+
# Fixes "C1128: number of sections exceeded object file format limit" in MSVC
324+
IF(WIN32 AND CMAKE_SIZEOF_VOID_P MATCHES 8)
326325
ADD_COMPILE_FLAGS(item_geofunc_setops.cc COMPILE_FLAGS "/bigobj")
327326
ENDIF()
328327

0 commit comments

Comments
 (0)