FindCUDA: nvcc fails when COMPILE_DEFINITIONS contains string-valued definition
Adding a COMPILE_DEFINITION with e.g.
add_definitions(-DFOO="BAR BAZ") does what I would expect, in that the compiler is called with
-DFOO="\"BAR BAZ\"". It does not work so well with nvcc however, which instead sees
-DFOO= -DBAR -DBAZ\" on which it subsequently croaks owing to the stray double quote. Removing the quotes in the
set(CUDA_NVCC_INCLUDE_DIRS "@CUDA_NVCC_INCLUDE_DIRS@") line in run_nvcc.cmake solves the issue at hand in spite of the comment stating that it "needs to be quoted to handle spaces properly"; I do suppose this introduces breakage elsewhere that I'm just not aware of.
This may very well be a PEBKAC at my end, but I haven't been able to figure this out after trawling through the documentation and mailing lists.