Skip to content

Commit a2bb751

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 8732961 commit a2bb751

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1+
2+
if(POLICY CMP0091)
3+
cmake_policy(SET CMP0091 NEW)
4+
endif()
5+
16
cmake_minimum_required(VERSION 3.19)
27

38
project(SwiftTSC LANGUAGES C Swift)
49

510
set(CMAKE_Swift_LANGUAGE_VERSION 5)
611
set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift)
12+
set(CMAKE_Swift_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)
713

14+
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)
815
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
916
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
1017
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

0 commit comments

Comments
 (0)