MantisBT - CMake
View Issue Details
0005149CMakeDocumentationpublic2007-06-08 11:412016-06-10 14:30
Brandon Van Every 
Bill Hoffman 
normaltextalways
closedmoved 
 
 
0005149: MESSAGE does not document quoting behavior
The entry for MESSAGE in cmake.html does not explain the difference between using quotes and not using them for string output. If newbies fail to use quotes, they get the underlying semicolon separated list output

It's worth having the CMake string vs. list storage model explained somewhere in the docs, as it underlies many other CMake operations and problems. It's logical to have it explained in MESSAGE, since that's where newbies typically notice the underlying list storage format.

One user wrote:

A couple of days ago I noticed something with the ";", too. If you
have a list (created either with SET or with LIST), when you try to
print it with MESSAGE( mylist ) elements are not separated by ";" but
if you print it with MESSAGE( "mylist" ) (with quotes), it will.

SET( mylist FOO BAR FIZZBUZZ )
MESSAGE( mylist ) # produces FOOBARFIZZBUZZ
MESSAGE( "mylist" ) # produces FOO;BAR;FIZZBUZZ

Until now I have only noticed that behavior with MESSAGE, I don't know
if that's a bug or if other commands are affected. That's with CMake
2.4.6, I have not tried any other version.
No tags attached.
Issue History
2007-08-09 14:47Brandon Van EveryPrioritylow => normal
2007-08-09 14:47Brandon Van EverySeverityminor => text
2007-08-09 14:47Brandon Van EveryCategory => Test Category
2007-08-09 15:34Bill HoffmanNote Added: 0008396
2007-08-23 16:09Alex NeundorfCategoryCMake => Documentation
2016-06-10 14:27Kitware RobotNote Added: 0041366
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0008396)
Bill Hoffman   
2007-08-09 15:34   
This is not specific to the message command.
If you have quotes around a list the ; are treated
as part of the string. If not, the ; is a list separator that separates arguments.
(0041366)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.