View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011690CMakeCMakepublic2011-01-12 14:562012-01-02 15:56
Reporterjdale 
Assigned ToDavid Cole 
PriorityhighSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformApple MacOSOS XOS Version10.4.10
Product VersionCMake 2.8.3 
Target VersionCMake 2.8.6Fixed in VersionCMake 2.8.6 
Summary0011690: Xcode project generator always overwrites user settings
DescriptionWhen generating an Xcode project using CMake, it will completely remove "<project name>.xcodeproj" before generating a new one. The problem with this is that "<project name>.xcodeproj" is actually a folder, not a file.

Contained within this folder you will find the following:
project.pbxproj <-- The actual Xcode project information
<username>.pbxuser <-- Your user data for this project
<username>.mode1v3 (or something similar) <-- Your layout data for this project

When generating an Xcode project, it should *only* generate a new "<project name>.xcodeproj" *if* one doesn't already exist. If one does already exist, it *only* needs to change the pbxproj file inside to update the Xcode project. This will allow CMake to be run without constantly losing your user settings which is *very* annoying when you're working on a project with multiple executables as it keeps forgetting which one you had selected!
Steps To ReproduceCreate an Xcode project using CMake
Change some user settings (such as the build target)
Regenerate the Xcode project and reload it in Xcode
Your changes will be lost
TagsNo tags attached.
Attached Filespatch file icon 0001-Xcode-Remember-generated-ObjectIDs-in-the-cache-to-a.patch [^] (4,611 bytes) 2011-01-30 16:47 [Show Content]
patch file icon 0001-xcode-Remember-generated-objectIDs-in-the-CMakeCache.patch [^] (4,708 bytes) 2011-01-31 14:34 [Show Content]
patch file icon 0002-XCode-Reuse-ObjectIDs.-This-version-uses-CoreFoundat.patch [^] (8,173 bytes) 2011-02-15 09:35 [Show Content]
patch file icon 0001-Save-objectIDS.patch [^] (8,015 bytes) 2011-02-15 14:23 [Show Content]

 Relationships

  Notes
(0024632)
jdale (reporter)
2011-01-12 14:58

Oops, I'm actually using OS X 10.6.5, not what it says on the bug. I'm also using Xcode 3.2.5, just in case it matters.
(0024633)
Johan Björk (reporter)
2011-01-12 16:33

It actually correctly keeps the folder and such, the issue is that it randomizes the GUIDs. See comments here: http://www.cmake.org/pipermail/cmake/2010-December/041555.html [^] and http://public.kitware.com/pipermail/cmake-developers/2010-December/000959.html. [^]

I'm working on a patch that follows bills advice.
(0024799)
David Cole (manager)
2011-01-17 15:04

Let me know when you get your patch working...

Thanks.
(0025169)
Johan Björk (reporter)
2011-01-30 16:52

Attached a patch. I tried to keep the patch to a minimum, since I know other people are doing larger works against the xcode generator. It seems when doing modifications to the cache in the xcode generator, it wasn't automatically written out, so I added a saveCache() call. I'm not sure if this is the correct way of doing things.

There is also the cmGlobalGenerator::createGUID + getGUID() calls. I could not figure out how to properly use these, or their relation to the xcode object files, so I did not use it.
(0025172)
David Cole (manager)
2011-01-30 20:34

Thanks for the patch. I'll take a look at it sometime in the next week or so and let you know what I think.
(0025174)
Johan Björk (reporter)
2011-01-31 03:00

ignore the patch for now, seems I broke quite a few of the tests.
(0025181)
Johan Björk (reporter)
2011-01-31 14:35
edited on: 2011-01-31 14:36

0001-xcode-Remember-generated-objectIDs-in-the-CMakeCache.patch is the fixed patch. I had a misstake where objectIDs would be duplicated if the PROJECT name was the same as one of the targets. It now passes all cmake tests on my machine.

(0025321)
Johan Björk (reporter)
2011-02-08 05:14

and after using it for a bit, this is still broken. The chances of collisions are quite high because it generates IDs based of the heap-location of the objects. Will fix and post updated patch asap.
(0025436)
Johan Björk (reporter)
2011-02-15 09:35
edited on: 2011-02-15 14:24

New version that asserts for duplicate object IDs and uses CoreFoundation to generate real UUID's instead of using the address of the created object.

(0026941)
David Cole (manager)
2011-06-21 13:06

Fix not ready and stable on time for release in 2.8.5, unsetting target version field...
(0027150)
Sean McBride (reporter)
2011-08-02 10:56

I haven't tried the patch, but very much agree this would be nice to fix. The described bug is very annoying.

Another specific problem is if one use svn, then there's also a .svn folder in the .xcodeproj folder, and it's presumably blown away too, which confuses svn to no end (happily svn 1.7 will have only one .svn folder at the root).
(0027268)
David Cole (manager)
2011-08-24 18:49

(slightly modified) patch applied and merged to 'next':

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1834f232a7f782eadd238a78481e3f9086095e97 [^]
(0028134)
David Cole (manager)
2012-01-02 15:56

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2011-01-12 14:56 jdale New Issue
2011-01-12 14:58 jdale Note Added: 0024632
2011-01-12 16:33 Johan Björk Note Added: 0024633
2011-01-17 15:04 David Cole Assigned To => David Cole
2011-01-17 15:04 David Cole Status new => assigned
2011-01-17 15:04 David Cole Note Added: 0024799
2011-01-30 16:47 Johan Björk File Added: 0001-Xcode-Remember-generated-ObjectIDs-in-the-cache-to-a.patch
2011-01-30 16:52 Johan Björk Note Added: 0025169
2011-01-30 20:34 David Cole Note Added: 0025172
2011-01-31 03:00 Johan Björk Note Added: 0025174
2011-01-31 14:34 Johan Björk File Added: 0001-xcode-Remember-generated-objectIDs-in-the-CMakeCache.patch
2011-01-31 14:35 Johan Björk Note Added: 0025181
2011-01-31 14:36 Johan Björk Note Edited: 0025181
2011-02-08 05:14 Johan Björk Note Added: 0025321
2011-02-15 09:35 Johan Björk File Added: 0002-XCode-Reuse-ObjectIDs.-This-version-uses-CoreFoundat.patch
2011-02-15 09:35 Johan Björk Note Added: 0025436
2011-02-15 14:23 Johan Björk File Added: 0001-Save-objectIDS.patch
2011-02-15 14:24 Johan Björk Note Edited: 0025436
2011-04-14 14:35 David Cole Target Version => CMake 2.8.5
2011-06-21 13:06 David Cole Note Added: 0026941
2011-06-21 13:06 David Cole Target Version CMake 2.8.5 =>
2011-08-02 10:56 Sean McBride Note Added: 0027150
2011-08-03 12:10 David Cole Target Version => CMake 2.8.6
2011-08-24 18:49 David Cole Note Added: 0027268
2011-08-24 18:49 David Cole Status assigned => resolved
2011-08-24 18:49 David Cole Fixed in Version => CMake 2.8.6
2011-08-24 18:49 David Cole Resolution open => fixed
2012-01-02 15:56 David Cole Note Added: 0028134
2012-01-02 15:56 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team