On 02/27/2013 10:44 AM, Stephen Kelly wrote: > If I write code like this: > > add_custom_command(... COMMAND moc -I$<JOIN:-I,foo;bar;bat> ...) > > and hoping to get > > moc -Ifoo -Ibar -Ibat > > what I actually get currently is > > moc "-Ifoo -Ibar -Ibat" > > That is, one argument instead of three, which makes a difference.
The idea of your first two commits is good but we need to go about it a bit differently. The argument splitting rule should remain simple: a quoted argument is one value and an unquoted argument expands on ";". What your topic needs to do is delay the expansion for unquoted generator expressions from configure to generate time. The problem is that by the time the arguments get to the add_custom_command implementation all you have is a string and no information about the original argument delimiter (unquoted or quoted). If we were to refactor command invocation internals then we could pass the information along. This would be useful elsewhere for example to teach the if() command not to auto-deref variables whose names are inside quoted args (with a policy). -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