[CMake] Problem with SET and multiple lines

alaterale at elitemail.org alaterale at elitemail.org
Thu Sep 29 13:20:51 EDT 2005


Hi,
I'm having a problem with multiple lines in regards to using SET.  I
know that if you have multiple items, it gets converted into a semicolon
delimited list, and I thought that got converted to spaces when
referenced, but it seems like now it converts to newlines.

Here is the code

####################################################
SET(DFLAGS_GENERAL
	"-UDEBUG_SETTINGS"
	"-UDEBUG_BGSPRITE"
	"-UDEBUG_SPRITE"
	"-UDEBUG_ANIMATIONS"
	"-UDEBUG_RENDERER"
	"-UDEBUG_SPRITEMANAGER"
	"-UDEBUG_OAMMANAGER"
	"-UDEBUG_PALETTE"
	"-UDEBUG_BACKGROUND"
	"-UDEBUG_CAMERA"
	"-UDEBUG_EMITTER"
)
####################################################

This is getting newlines entered into the string when it gets
referenced, which I don't ever remember happening before, as it breaks
my generated makefiles.

Also, when doing this before:

####################################################
SET(DFLAGS_GENERAL "
	-UDEBUG_SETTINGS
	-UDEBUG_BGSPRITE
	-UDEBUG_SPRITE
	-UDEBUG_ANIMATIONS
	-UDEBUG_RENDERER
	-UDEBUG_SPRITEMANAGER
	-UDEBUG_OAMMANAGER
	-UDEBUG_PALETTE
	-UDEBUG_BACKGROUND
	-UDEBUG_CAMERA
	-UDEBUG_EMITTER
")
####################################################

it used to embed them all into one line by spaces (as there's no way to
do "\ ", but the above was equivalent I found out a while back).  Now it
also keeps the newlines I enter.  I don't want to put the whole string
on one line, as it makes it hard to read and scroll.  Ultimately I just
want a string can be multi line but still just translate to space
delimited, not newline delimited.  Did cmake change this behavior
recently?  I do remember this working a while back.

Any pointers would be greatly appreciated,
Thanks!


More information about the CMake mailing list