Skip to content

Commit 50103cd

Browse files
authored
Merge pull request #16005 from troughton/not-release-is-not-debug
2 parents a5a68ca + 823bb0a commit 50103cd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,12 @@ function(_add_variant_c_compile_flags)
227227
if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
228228
list(APPEND result -Xclang;--dependent-lib=oldnames)
229229
# TODO(compnerd) handle /MT, /MTd, /MD, /MDd
230-
if("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE")
231-
list(APPEND result "-D_MD")
232-
list(APPEND result -Xclang;--dependent-lib=msvcrt)
233-
else()
230+
if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
234231
list(APPEND result "-D_MDd")
235232
list(APPEND result -Xclang;--dependent-lib=msvcrtd)
233+
else()
234+
list(APPEND result "-D_MD")
235+
list(APPEND result -Xclang;--dependent-lib=msvcrt)
236236
endif()
237237
endif()
238238

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ function(_report_sdk prefix)
1414
message(STATUS " UCRT Version: $ENV{UCRTVersion}")
1515
message(STATUS " UCRT SDK Dir: $ENV{UniversalCRTSdkDir}")
1616
message(STATUS " VC Dir: $ENV{VCToolsInstallDir}")
17-
if("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE")
18-
message(STATUS " ${CMAKE_BUILD_TYPE} VC++ CRT: MD")
19-
else()
17+
if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
2018
message(STATUS " ${CMAKE_BUILD_TYPE} VC++ CRT: MDd")
19+
else()
20+
message(STATUS " ${CMAKE_BUILD_TYPE} VC++ CRT: MD")
2121
endif()
2222

2323
foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})

0 commit comments

Comments
 (0)