[CMake] foreach() bug?

Alexandre.Feblot at thomsonreuters.com Alexandre.Feblot at thomsonreuters.com
Tue May 5 12:41:36 EDT 2009


ping?

________________________________

Hi,

 

this code:

 

list(APPEND list A B "" C D)

message("List: ${list}")

foreach(arg ${list})

    message("List elem: ${arg}")

endforeach()

 

has the following result:

 

List: A;B;;C;D

List elem: A

List elem: B

List elem: C

List elem: D

 

The empty element has been discarded by foreach(). Is this the wanted
behaviour? If it is, how can I manage empty elements when I need them?

 

thanks

Alexandre  



This email was sent to you by Thomson Reuters, the global news and information company.
Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090505/c62ba173/attachment.htm>


More information about the CMake mailing list