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                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to