mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
CUDA: Link to standard system libraries when linking as CUDA
On Windows with MSVC-like host compilers we must honor the standard libraries chosen by the `Platform/Windows-MSVC` module. Otherwise C code linked into the CUDA binary that expects to have these libraries available may not link.
This commit is contained in:
@@ -40,3 +40,5 @@ string(APPEND CMAKE_CUDA_FLAGS_DEBUG_INIT " -Xcompiler=-MDd,-Zi,-RTC1")
|
||||
string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -Xcompiler=-MD")
|
||||
string(APPEND CMAKE_CUDA_FLAGS_RELWITHDEBINFO_INIT " -Xcompiler=-MD")
|
||||
string(APPEND CMAKE_CUDA_FLAGS_MINSIZEREL_INIT " -Xcompiler=-MD")
|
||||
|
||||
set(CMAKE_CUDA_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
|
||||
|
||||
Reference in New Issue
Block a user