Re: Project indexer ignoring SYMROOT in xcconfig file
Re: Project indexer ignoring SYMROOT in xcconfig file
- Subject: Re: Project indexer ignoring SYMROOT in xcconfig file
- From: email@hidden
- Date: Wed, 7 Nov 2007 19:44:32 +0100
I am trying to change SYMROOT across a whole bunch of projects (and branches thereof) so that the source tree is completely untouched by building or opening the project. i.e I don't want any files generated by Xcode to end up in there
E.g Imagine my source hierarchy was something like this:
/Source ...Project1 ......Branch1 ......Branch2 ...Project2 ......Branch1 ......Branch2
etc
All my projects share common xcconfig files which have lines similar to these:
BRANCH_NAME = Branch1 SYMROOT = /BuiltBits/$(BRANCH_NAME)
where each branch would define BRANCH_NAME as appropriate
This way I can have a single top-level folder for all the generated stuff, but not have to worry about interference between branches.
This works great, except for the fact that when Xcode 3 opens a project and starts indexing the files in the project, it seems to be ignoring the value of SYMROOT as set in the xxconfig and instead uses its default value of $SRCROOT/build/ as the location for the .pbxindex folder.
If I set a Custom Location for 'Place Build Products In' in the Project's General info to be $(SYMROOT) it does actually work, but the problems then are:
1. This has to be done for every project, thereby negating the usefulness of the xcconfig file. 2. This setting is a per-user setting and as such is not saved in the project.pbxproj file (which gets checked in to SCM), so every user would have to do this for every project and branch. 3. Before this setting is changed, it will already have indexed some/all of the source into $SRCROOT/build/ProjName.build/ProjName.pbxindex
Can anyone see a way out of this, or am I trying to do too much
SYMROOT has everything to do with where build products are placed and nothing to do with where source files are read from. Indexing has nothing to do with SYMROOT; only inputs are indexed, not outputs. So you can't use SYMROOT to segregate inputs for the purposes of indexing.
The 'droid you're looking for is:
defaults write com.apple.Xcode XCCodeSenseIndexBasePath $(SRCROOT)/index.pbxindex
Normally the project index is stored with the intermediate files. When you have two projects that have the same name, and you have a common build directory for all projects, the indexes for two different branches of one project will clash. The solution is to store project indexes relative to the (distinct) project sources, rather than the (common) intermediates.
Chris
OK, but according to that documentation, the default value for XCCodeSenseIndexBasePath is OBJROOT/<project_name>.pbxindex.
So why, when I add:
OBJROOT = /BuiltBits/$(BRANCH_NAME)
to my xxconfig file does it still want to put the indexes in the same folder as my project file, and not somewhere in my BuiltBits folder?
Matt
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden