Skip to content

Commit 83d2208

Browse files
committed
build: allow building in Debug mode on Windows
With this tweak, we should be able to build the package in debug mode even on Windows. We always use the release mode DLL form of the C/C++ runtime on Windows and can build the Swift code in Debug or Release mode optimizations.
1 parent 0b7d13f commit 83d2208

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@ if(POLICY CMP0028)
22
cmake_policy(SET CMP0028 NEW)
33
endif()
44

5+
if(POLICY CMP0091)
6+
cmake_policy(SET CMP0091 NEW)
7+
endif()
8+
59
cmake_minimum_required(VERSION 3.19)
610

711
project(SwiftTSC LANGUAGES C Swift)
812

913
set(CMAKE_Swift_LANGUAGE_VERSION 5)
1014
set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift)
15+
set(CMAKE_Swift_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)
1116

17+
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)
1218
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
1319
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
1420
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

0 commit comments

Comments
 (0)