[cmake-developers] [CMake 0012303]: ARGN stripped of empty elements

Mantis Bug Tracker mantis at public.kitware.com
Fri Jun 24 12:40:11 EDT 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=12303 
====================================================================== 
Reported By:                Clinton Stimpson
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12303
Category:                   CMake
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-06-24 12:40 EDT
Last Modified:              2011-06-24 12:40 EDT
====================================================================== 
Summary:                    ARGN stripped of empty elements
Description: 

When creating a function with optional arguments, ARGN is strip of empty
arguments.
This means one cannot use ARGN for optional arguments that are ordered.

function(foo arg1 arg2)
  message("ARGV=${ARGV}")
  # should give "arg1;arg2;;arg4"
  message("ARGN=${ARGN}")
  # should give ";arg4" instead of "arg4"
endfunction(foo)

foo("arg1" "arg2" "" "arg4")

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-06-24 12:40 Clinton StimpsonNew Issue                                    
======================================================================




More information about the cmake-developers mailing list