[cmake-developers] Test fails with Xcode

Stephen Kelly steveire at gmail.com
Wed Jun 26 12:31:59 EDT 2013


Brad King wrote:

> On 06/26/2013 11:16 AM, Stephen Kelly wrote:
>>  http://open.cdash.org/testDetails.php?test=196514636&build=2948288
>> 
>> The unit test seems to be exposing a bug in the Xcode generator or in the
>> handling of the COMPILE_OPTIONS target property. Any idea what could be
>> going on?
> 
> The generated Xcode project file has
> 
>  COMPILER_FLAGS = "-DTEST_C_COMPILER_VERSION=\\"4.1.0\\" ..."
> 
> but it should be
> 
>  COMPILER_FLAGS = "-DTEST_C_COMPILER_VERSION=\\\"4.1.0\\\" ..."
> 
> Where is the escaping supposed to happen for the CompileOptions APIs?

It calls the virtual cmLocalGenerator::AppendFlags, and 
cmLocalUnixMakefileGenerator3::AppendFlags does appropriate escaping, but 
the former does not. 

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?

Thanks,

Steve.







More information about the cmake-developers mailing list