[CMake] xcode generator's use of explicitFileType vs lastKnownFileType

Radu Margarint raduma at raduma.com
Thu Dec 18 17:59:21 EST 2014


Greetings,

I hope I'm asking this in correct place. I have recently been running
into some issues using the xcode project files generated though cmake,
and I have traced them down to PBXFileReference nodes using
explicitFileType attributes (vs lastKnownFileType).

The projects generated are some fairly vanilla mac static libs +
console apps, with a file count of ~500ish, about a dozen targets in
all. Nothing I would consider complex. However, attempting to open the
generated project files in xcode results in xcode hanging for about
3-4 minutes parsing the project file, at open time or whenever it
decides it should reparse it. (Sampling it indicates that it's
spending it's time calling [PBXFileReference
_getEffectiveFileType:fileProperties:] over and over and over).
Eventually it finishes and wakes up.

Though a lot of trial and error manually mucking with the generated
project files, I've traced the slowdown to the use of
"explicitFileType" on the file reference nodes. A simple replace to
"lastKnownFileType" fixes the issue and xcode opens the project
instantly.

I'm wondering if anyone has seen this before, and if there are any
fixes recommended. (The obvious one being I can patch my cmake
generator locally to use the desired attribute, though I'm hoping that
maybe there are some known root causes and better fixes). (FWIW, the
slow down occurs on both Xcode 5.x and 6.x, on a couple of machines
across Yosemite and Mavericks).

Thanks
--radu


More information about the CMake mailing list