[cmake-developers] [CMake 0014353]: generator expression $<1:...> and $<0:...> fail with white space in provided strings.

Mantis Bug Tracker mantis at public.kitware.com
Tue Aug 13 04:12:15 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14353 
====================================================================== 
Reported By:                chrislu
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14353
Category:                   CCMake
Reproducibility:            always
Severity:                   block
Priority:                   urgent
Status:                     new
====================================================================== 
Date Submitted:             2013-08-13 04:12 EDT
Last Modified:              2013-08-13 04:12 EDT
====================================================================== 
Summary:                    generator expression $<1:...> and $<0:...> fail with
white space in provided strings.
Description: 
the below example breaks when spaces are in the argument lists.

for the release configuration everything works as expected as the argument list
contains just a single entry. but for the debug configuration $<1:something
something dark side> is inserted into the argument list.

this is very urgend as CMake does offer no other way to set different arguments
to the custom commands depending on the configuration!

set(SCM_ARGS_A something)
set(SCM_ARGS_B something something dark side)

add_custom_command(OUTPUT   ${CUDA_NVCC_OUTPUT_FILE}
                               COMMAND  ${SCM_CUDA_NVCC_COMMAND}
                                   ARGS $<$<CONFIG:Release>:${SCM_ARGS_A}>
                                        $<$<CONFIG:Debug>:${SCM_ARGS_B }>
                                        ${SCM_CUDA_NVCC_OPTIONS} 
                                        ${SCM_CUDA_NVCC_INC_DIR_STRING}
                                        ${SCM_CUDA_NVCC_DEF_STRING}
                                        -o \"${CUDA_NVCC_OUTPUT_FILE}\"
                                        \"${input_file}\"
                               MAIN_DEPENDENCY ${input_file}
                               DEPENDS  ${input_file}
                               COMMENT "NVCC compiling (${input_file_name}):")
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-08-13 04:12 chrislu        New Issue                                    
======================================================================




More information about the cmake-developers mailing list