[cmake-developers] [CMake 0014565]: CUDA_NVCC_FLAGS_<config> in FindCuda.cmake

Mantis Bug Tracker mantis at public.kitware.com
Wed Nov 13 04:47:51 EST 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14565 
====================================================================== 
Reported By:                ahaferburg
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14565
Category:                   CMake
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-11-13 04:47 EST
Last Modified:              2013-11-13 04:47 EST
====================================================================== 
Summary:                    CUDA_NVCC_FLAGS_<config> in FindCuda.cmake
Description: 
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. 
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-11-13 04:47 ahaferburg     New Issue                                    
======================================================================




More information about the cmake-developers mailing list