[CMake] STRING(REPLACE eats semi-colons
JD Smith
jdsmith at as.arizona.edu
Thu Aug 2 23:43:36 EDT 2007
On Aug 2, 2007, at 7:41 PM, Bill Hoffman wrote:
> JD Smith wrote:
>>
>> set( f "this; ...is: a; test")
>> MESSAGE(${f})
>> STRING(REPLACE is was f ${f})
>> MESSAGE(${f})
>>
>> Probably to do with the syntax for lists, but is there a way to
>> avoid STRING(REPLACE from eating semi-colons? I'm trying to
>> replace a sed call with pure CMAKE, but in text replacing on an
>> XML file, it's doing damage.
> The problem is in the message command.
>
> Try message("${f}")
Thanks, I discovered that just after writing. In my (real) case, it
was:
FILE(WRITE ${file} "${_contents}")
JD
More information about the CMake
mailing list