View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013089CMakeCMakepublic2012-03-31 15:392012-09-03 16:00
ReporterChristoph Anton Mitterer 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionsuspended 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0013089: lists parsing is quite strange and not as documented
DescriptionHi.

http://www.cmake.org/cmake/help/syntax.html [^]
tells that lists are set like:
set(VAR a;b;c)
or
set(VAR a b c)


However, when using string literals this doesn't work anymore, e.g.
1) List items separated by semicolons
set(foo "1 1";"2 2";"3 3")
message(${foo})
foreach(ff IN LISTS foo)
        message("dd: ${ff}")
endforeach()

=> yields in:
1 1"2 2""3 3"
dd: 1 1
dd: "2 2"
dd: "3 3"


2) List items separated by spaces
set(foo "1 1" "2 2" "3 3")
message(${foo})
foreach(ff IN LISTS foo)
        message("dd: ${ff}")
endforeach()

=> yields in:
1 12 23 3
dd: 1 1
dd: 2 2
dd: 3 3


(2) Is obviously what one would expect in both cases.


Cheers,
Chris.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0029098)
Brad King (manager)
2012-04-09 09:03

Issues 0013083, 0013089, 0013090, 0013091, 0013092, 0013109, and 0013111 are all interesting suggestions but the issue tracker is not a good place to discuss them. The user list is a better place for discussion because it may attract interest from others, and in particular from potential contributors. Others may also suggest alternative solutions.
(0030848)
David Cole (manager)
2012-09-03 16:00

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-03-31 15:39 Christoph Anton Mitterer New Issue
2012-04-09 09:03 Brad King Note Added: 0029098
2012-04-09 09:03 Brad King Status new => resolved
2012-04-09 09:03 Brad King Resolution open => suspended
2012-04-09 09:03 Brad King Assigned To => Brad King
2012-09-03 16:00 David Cole Note Added: 0030848
2012-09-03 16:00 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team