diff options
author | Brad King <brad.king@kitware.com> | 2017-02-14 15:34:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-14 15:34:15 (GMT) |
commit | 1c60231ca546597ef8b80e7340c8991b06387cbf (patch) | |
tree | 4fdbe8a21f58d5b0ea665c5f6cc3fdc181da074c /Modules/Platform/Windows-NVIDIA-CUDA.cmake | |
parent | 8d75d8dc72a0ac4502991891782a2c84df1f61c3 (diff) | |
download | CMake-1c60231ca546597ef8b80e7340c8991b06387cbf.zip CMake-1c60231ca546597ef8b80e7340c8991b06387cbf.tar.gz CMake-1c60231ca546597ef8b80e7340c8991b06387cbf.tar.bz2 |
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.
Diffstat (limited to 'Modules/Platform/Windows-NVIDIA-CUDA.cmake')
-rw-r--r-- | Modules/Platform/Windows-NVIDIA-CUDA.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-NVIDIA-CUDA.cmake b/Modules/Platform/Windows-NVIDIA-CUDA.cmake index 809ee06..eda41e0 100644 --- a/Modules/Platform/Windows-NVIDIA-CUDA.cmake +++ b/Modules/Platform/Windows-NVIDIA-CUDA.cmake @@ -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}") |