MantisBT - CMake
View Issue Details
0014565CMakeCMakepublic2013-11-13 04:472016-06-10 14:31
ahaferburg 
James Bigler 
normalminorhave not tried
closedmoved 
 
 
0014565: CUDA_NVCC_FLAGS_<config> in FindCuda.cmake
CUDA_NVCC_FLAGS_DEBUG, CUDA_NVCC_FLAGS_RELEASE, etc are all being ignored; they don't end up in the .cu.cmake files (generated by cuda_add_library() I believe). I've traced this to an empty CUDA_NVCC_FLAGS_CONFIG, which in turn comes from an empty CUDA_configuration_types variable when it is used in the macro CUDA_WRAP_SRCS. However, when I put CUDA_configuration_types into the parent scope it all works properly (I think):

FindCuda.cmake:470
set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE}
  Debug MinSizeRel Release RelWithDebInfo)
list(REMOVE_DUPLICATES CUDA_configuration_types)

set(CUDA_configuration_types ${CUDA_configuration_types} PARENT_SCOPE) # <<---- missing

Note that we include a script which calls FIND_PACKAGE(). We then add projects with add_subdirectory(), one of which uses CUDA. I assume using add_subdirectory() causes the problem.
No tags attached.
Issue History
2013-11-13 04:47ahaferburgNew Issue
2013-11-13 04:50ahaferburgNote Added: 0034440
2013-11-13 08:44Brad KingAssigned To => James Bigler
2013-11-13 08:44Brad KingStatusnew => assigned
2016-06-10 14:29Kitware RobotNote Added: 0042421
2016-06-10 14:29Kitware RobotStatusassigned => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0034440)
ahaferburg   
2013-11-13 04:50   
I'm using 2.8.8.20120503, but I've also tried with the FindCuda.cmake from 2.8.12.1, where the problem still exists.
(0042421)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.