diff options
author | Brad King <brad.king@kitware.com> | 2018-05-25 14:03:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-25 14:03:03 (GMT) |
commit | edf0ea9bb2a0ecd411e14d0c7e27089cc258048b (patch) | |
tree | 860219dbd6a379592ea4e29ab404812e4d598a18 /Modules/CMakeCUDAInformation.cmake | |
parent | 46b26b52c9e4a308dbb9efbca062ae15a2a2d47c (diff) | |
download | CMake-edf0ea9bb2a0ecd411e14d0c7e27089cc258048b.zip CMake-edf0ea9bb2a0ecd411e14d0c7e27089cc258048b.tar.gz CMake-edf0ea9bb2a0ecd411e14d0c7e27089cc258048b.tar.bz2 |
CUDA: Drop unused/broken platform link flags placeholder
The `<CMAKE_CUDA_LINK_FLAGS>` placeholder in CUDA rule variables comes
from the `<CMAKE_CXX_LINK_FLAGS>` placeholder from which the CUDA rule
variables were originally derived. It is not a public interface for
adding link flags so no projects should be using it. It is needed for
platform information modules to specify platform-specific link flags for
the language. None of our platform modules set it, so it is unused.
Furthermore, it is broken as currently implemented. Some of the
contexts in which it is used need `-Xlinker` and some do not.
Therefore it is not possible to use the placeholder at all.
Simply remove it for now. If some need for platform-specific CUDA link
flags arises a new solution will be needed.
Diffstat (limited to 'Modules/CMakeCUDAInformation.cmake')
-rw-r--r-- | Modules/CMakeCUDAInformation.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake index 479493b..8e62941 100644 --- a/Modules/CMakeCUDAInformation.cmake +++ b/Modules/CMakeCUDAInformation.cmake @@ -168,7 +168,7 @@ endif() # compile a cu file into an executable if(NOT CMAKE_CUDA_LINK_EXECUTABLE) set(CMAKE_CUDA_LINK_EXECUTABLE - "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <CMAKE_CUDA_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_LINKS}") + "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_LINKS}") endif() if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "8.0.0") @@ -194,11 +194,11 @@ unset(__IMPLICT_DLINK_DIRS) #These are used when linking relocatable (dc) cuda code if(NOT CMAKE_CUDA_DEVICE_LINK_LIBRARY) set(CMAKE_CUDA_DEVICE_LINK_LIBRARY - "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <CMAKE_CUDA_LINK_FLAGS> <LANGUAGE_COMPILE_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_DLINK_FLAGS}") + "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <LANGUAGE_COMPILE_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_DLINK_FLAGS}") endif() if(NOT CMAKE_CUDA_DEVICE_LINK_EXECUTABLE) set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE - "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <FLAGS> <CMAKE_CUDA_LINK_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_DLINK_FLAGS}") + "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_DLINK_FLAGS}") endif() unset(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS) |