[cmake-developers] [CMake 0016097]: FindCUDA.cmake implicit target_link_libraries() can not be mixed with new signature
Mantis Bug Tracker
mantis at public.kitware.com
Mon May 9 10:31:25 EDT 2016
The following issue has been SUBMITTED.
======================================================================
https://cmake.org/Bug/view.php?id=16097
======================================================================
Reported By: Nils Gladitz
Assigned To:
======================================================================
Project: CMake
Issue ID: 16097
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-05-09 10:31 EDT
Last Modified: 2016-05-09 10:31 EDT
======================================================================
Summary: FindCUDA.cmake implicit target_link_libraries() can
not be mixed with new signature
Description:
e.g. CUDA_ADD_LIBRARY currently implicitly links to the CUDA libraries with:
target_link_libraries(${cuda_target} ${CUDA_LIBRARIES})
Afterwards additional libraries can not be linked with the newer
PRIVATE|PUBLIC|INTERFACE signature (since signatures can not be mixed).
It would be nice if one of these keywords could be added to the implicit
target_link_libraries() calls upon user request.
Steps to Reproduce:
cmake_minimum_required(VERSION 3.5.1)
find_package(CUDA REQUIRED)
file(WRITE my_cuda_lib.cpp "")
cuda_add_library(my_cuda_lib SHARED my_cuda_lib.cpp)
file(WRITE some_other_lib.cpp "")
add_library(some_other_lib SHARED some_other_lib.cpp)
# The plain signature for target_link_libraries has already been used with
# the target "my_cuda_lib". All uses of target_link_libraries with a target
# must be either all-keyword or all-plain.
target_link_libraries(my_cuda_lib PRIVATE some_other_lib)
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-05-09 10:31 Nils Gladitz New Issue
======================================================================
More information about the cmake-developers
mailing list