On 6/26/2013 12:31 PM, Stephen Kelly wrote: > It calls the virtual cmLocalGenerator::AppendFlags, and > cmLocalUnixMakefileGenerator3::AppendFlags does appropriate escaping, but > the former does not.
No, cmLocalUnixMakefileGenerator3::AppendFlags does no escaping except to fix up special cases on Watcom Make to make it work like other make tools. > I think the problem is that there is no cmLocalXCodeGenerator::AppendFlags > override. Given commit 35496761a58956bd8c5ad65a3ed9ee78d09af56b, I think a > similar problem should appear if a similar -DFOO="Bar" is put into the > COMPILE_FLAGS target property. That would confirm that this problem pre- > dates the COMPILE_OPTIONS property. Can you test that? Ahh. COMPILE_FLAGS has *never* been escaped on *any* generator. It is just a raw string to be added to command lines. This is historical and will not be changed, which is one reason we need a new feature like COMPILE_OPTIONS. Part of the value of COMPILE_OPTIONS is supposed to be that it takes a ;-list of options and escapes each one appropriately. You'll have to go back and fix up the generators or cmTarget's GetCompileOptions method to use lg->EscapeForShell when appending each flag. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers