MantisBT - CMake
View Issue Details
0012259CMakeCMakepublic2011-06-09 04:332012-01-02 15:56
Jesse Beder 
David Cole 
normalminoralways
closedfixed 
MacOS X10.6.7
CMake 2.8.4 
CMake 2.8.6CMake 2.8.6 
0012259: CMake generates invalid Xcode projects when given an Xcode attribute with a comma
Xcode can't open the file, saying that "the project could not be parsed". The example given generates the line

    TARGETED_DEVICE_FAMILY = 1,2;

If you change all instances to

    TARGETED_DEVICE_FAMILY = "1,2";

then the project can be parsed correctly. I'm guessing CMake should just quote any string with a comma.
Use the following CMakeLists.txt file:

    cmake_minimum_required(VERSION 2.6)
    project(test)
    set(CMAKE_OSX_SYSROOT iphoneos4.2)
    set(CMAKE_OSX_ARCHITECTURES "armv6;armv7")
    add_executable(test test.c)
    set_target_properties(test PROPERTIES XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")

and run cmake with "-G Xcode", and then try to open the Xcode project.

(The file "test.c" can be anything.)
Xcode version 3.2.5, 64-bit
No tags attached.
patch 0001-xcode-Also-qoute-for-xcode-strings-0012259.patch (906) 2011-06-09 04:39
https://public.kitware.com/Bug/file/3923/0001-xcode-Also-qoute-for-xcode-strings-0012259.patch
Issue History
2011-06-09 04:33Jesse BederNew Issue
2011-06-09 04:39Johan BjörkNote Added: 0026802
2011-06-09 04:39Johan BjörkFile Added: 0001-xcode-Also-qoute-for-xcode-strings-0012259.patch
2011-06-13 14:42David ColeAssigned To => David Cole
2011-06-13 14:42David ColeStatusnew => assigned
2011-08-03 21:48David ColeTarget Version => CMake 2.8.6
2011-08-04 14:56David ColeNote Added: 0027171
2011-08-04 14:56David ColeStatusassigned => resolved
2011-08-04 14:56David ColeFixed in Version => CMake 2.8.6
2011-08-04 14:56David ColeResolutionopen => fixed
2012-01-02 15:56David ColeNote Added: 0028121
2012-01-02 15:56David ColeStatusresolved => closed

Notes
(0026802)
Johan Björk   
2011-06-09 04:39   
Attached patch. Do you know any other characters that can appear in xcode configuration files that need quotes?
(0027171)
David Cole   
2011-08-04 14:56   
Fix pushed to CMake 'next':

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d87eb350f6b7c810145205fb6819e3174efdcc23 [^]
(0028121)
David Cole   
2012-01-02 15:56   
Closing resolved issues that have not been updated in more than 4 months.