From 1d6e1e7f72b1e9a9c4433c16117df3e8f0ff0aa9 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Tue, 11 Nov 2025 15:14:46 -0800 Subject: [PATCH] add cmake wa for msvc cuda --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ebe3737f9..78f191b32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,14 @@ endif() message("current binary directory: ${CMAKE_CURRENT_BINARY_DIR}") +if(MSVC) + cmake_policy(SET CMP0091 NEW) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") +endif() + +# For extra safety, you can also enforce the CUDA runtime to be shared/dynamic: +# set(CMAKE_CUDA_RUNTIME_LIBRARY SHARED) + project( multi HOMEPAGE_URL "https://gitlab.com/correaa/boost-multi"