I've been using make to build llvm but use Xcode for most other projects I work on. I decided to try running cmake to build an xcode project for llvm. The results were disappointing. The generated xcode project does not encode that executables link with static libraries. Instead, the static libraries are snuck in under "Other linker flags", then some pre- and post- scripts on every target are run which cause xcode to re-check mod times on files and forces a re-link. This is painfully slow. What should be a two second: recompile file, update static library, re-link executable turns into a 15 second running of dozens of shells scripts that touch and copy files. I tried making a simple cmake project with a static library and a main executable, and saw the same crazy xcode project generated. Are there cmake settings to correct this? Is there some reason the xcode projects are made like this? Or is is just that the cmake maintainers have not had the time to invest in generated proper xcode projects? -Nick
Nick Kledzik <kledzik at apple.com> writes:> I've been using make to build llvm but use Xcode for most other > projects I work on. I decided to try running cmake to build an xcode > project for llvm. The results were disappointing.Sorry to hear this.> The generated xcode project does not encode that executables link with > static libraries. Instead, the static libraries are snuck in under > "Other linker flags", then some pre- and post- scripts on every target > are run which cause xcode to re-check mod times on files and forces a > re-link. This is painfully slow. What should be a two second: > recompile file, update static library, re-link executable turns into a > 15 second running of dozens of shells scripts that touch and copy > files. > > I tried making a simple cmake project with a static library and a main > executable, and saw the same crazy xcode project generated. > > Are there cmake settings to correct this? Is there some reason the > xcode projects are made like this? Or is is just that the cmake > maintainers have not had the time to invest in generated proper xcode > projects?I have no access to an OS/X machine so there is little I can do about this issues. However, your description indicates that those are generic cmake issues and not restricted to LLVM. I suggest that you re-post your message to the cmake mailing list: http://www.cmake.org/cmake/help/mailing.html (posting through gmane works fine.) The cmake guys are quite friendly and eager to help.
Hi Nick, The CMake devlopers at KitWare work mainly on high-end parallel processing supercomputers. Macs aren't their highest priority usually since their machines run primarily Linux and Unix. If you want to streamline the XCode code generator, I'm afraid you'll have to get on the CMake mailing list and talk to the developers yourself. Sorry I couldn't be more help, --Sam ----- Original Message ----> From: Nick Kledzik <kledzik at apple.com> > To: LLVMdev Mailing List <llvmdev at cs.uiuc.edu> > Sent: Thu, January 13, 2011 1:07:52 PM > Subject: [LLVMdev] CMake and Xcode > > I've been using make to build llvm but use Xcode for most other projects I work >on. I decided to try running cmake to build an xcode project for llvm. The >results were disappointing. > > > The generated xcode project does not encode that executables link with static >libraries. Instead, the static libraries are snuck in under "Other linker >flags", then some pre- and post- scripts on every target are run which cause >xcode to re-check mod times on files and forces a re-link. This is painfully >slow. What should be a two second: recompile file, update static library, >re-link executable turns into a 15 second running of dozens of shells scripts >that touch and copy files. > > > I tried making a simple cmake project with a static library and a main >executable, and saw the same crazy xcode project generated. > > > Are there cmake settings to correct this? Is there some reason the xcode >projects are made like this? Or is is just that the cmake maintainers have not >had the time to invest in generated proper xcode projects? > > -Nick > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >