[cmake-developers] [CMake 0014078]: FindCUDA "-D${cuda_target}_EXPORTS" generates invalid identifier
Mantis Bug Tracker
mantis at public.kitware.com
Fri Apr 12 18:32:30 EDT 2013
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=14078
======================================================================
Reported By: szotsaki
Assigned To:
======================================================================
Project: CMake
Issue ID: 14078
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2013-04-12 18:32 EDT
Last Modified: 2013-04-12 18:32 EDT
======================================================================
Summary: FindCUDA "-D${cuda_target}_EXPORTS" generates
invalid identifier
Description:
I use CMake as out-of-source-build way, and that's why my cuda_add_library call
looks like this:
cuda_add_library(../models/program_gpu ../models/program_gpu.cu MODULE)
Because it's built as a MODULE, the following line applies in FindCUDA.cmake:
if(_cuda_build_shared_libs)
list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS")
endif()
It generates the following:
/usr/local/cuda-5.0/bin/nvcc [...] -D../models/program_gpu_EXPORTS [...]
Apart from that fact it's not useful, the C standard says it's not valid also.
So I got the following error message from nvcc:
<command-line>:0:1: error: macro names must be identifiers
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-04-12 18:32 szotsaki New Issue
======================================================================
More information about the cmake-developers
mailing list