Skip to content

Commit a989898

Browse files
alfCcorreaa
authored andcommitted
add cmake wa for msvc cuda
1 parent 3c19bf4 commit a989898

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ endif()
4242

4343
message("current binary directory: ${CMAKE_CURRENT_BINARY_DIR}")
4444

45+
if(MSVC)
46+
cmake_policy(SET CMP0091 NEW)
47+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
48+
endif()
49+
50+
# For extra safety, you can also enforce the CUDA runtime to be shared/dynamic:
51+
# set(CMAKE_CUDA_RUNTIME_LIBRARY SHARED)
52+
4553
project(
4654
multi
4755
HOMEPAGE_URL "https://gitlab.com/correaa/boost-multi"

0 commit comments

Comments
 (0)