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. Thanks, JD