[cmake-developers] [CMake 0012603]: When passing ARGV or ARGN on to subfunction, empty elements are stripped off
Mantis Bug Tracker
mantis at public.kitware.com
Wed Nov 30 22:36:39 EST 2011
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=12603
======================================================================
Reported By: Andreas Schuh
Assigned To:
======================================================================
Project: CMake
Issue ID: 12603
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2011-11-30 22:36 EST
Last Modified: 2011-11-30 22:36 EST
======================================================================
Summary: When passing ARGV or ARGN on to subfunction, empty
elements are stripped off
Description:
When attempting to pass on the optional or all arguments given to one function
on to another function using ARGN or ARGV, the empty elements in those lists are
stripped off.
Saving the attached example code in a file and executing it with "cmake -P
<script>" outputs
foo(s;h;t)
bar(s;h;t)
though the expected output would have been
foo(s;h;;;t)
bar(s;h;;;t)
This bug is related to bug 0012303, but yet seems to differ.
Steps to Reproduce:
cmake_minimum_required (VERSION 2.6)
function (foo)
message ("foo(${ARGV})")
endfunction ()
function (bar)
message ("bar(${ARGV})")
endfunction ()
function (foobar)
foo (${ARGV})
bar (${ARGN})
endfunction ()
foobar (s h "" "" "t")
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-11-30 22:36 Andreas Schuh New Issue
======================================================================
More information about the cmake-developers
mailing list