Re: Xcode 4 hangs during build and large project advice
Re: Xcode 4 hangs during build and large project advice
- Subject: Re: Xcode 4 hangs during build and large project advice
- From: Jerry Gagelman <email@hidden>
- Date: Wed, 16 Mar 2011 12:09:40 +0100
Were you using Xcode 3's build system for previous incarnations of the projects, or an external build system?
I have had a build "hang" during some stages of building a specific target. I've noticed it when I add a target that uses Xcode's build management (like a command line utility) to a project that I've created using an external build system. I suspect this is different from the problem that you're experiencing.
As far as what you are trying to do with different preprocessor definitions --- I presume with -D flags --- there might be a more systematic way. Go to the "Info" tab of at the project root level. Under "Configurations" there is a "+" button to add new ones. You should be able to manage multiple targets within one configuration while having fine control over the level of "global-ness" of preprocessor flags under the "Build settings" tab.
I have never actually tried that, however. For things like what you're describing, I stick to Autotools and manage all of the preprocessor #defines in config.h. (Though I don't want to wish that headache on anyone...)
Jerry
PS. If you have access to the developer forums, you might find some good advice at:
On Wed, Mar 16, 2011 at 09:21, Daniel Vollmer
<email@hidden> wrote:
Hi,
after diving in head-first and trying out Xcode 4 with a large CFD software, I've encountered the problem that during the build of the final target, Xcode just hangs. It's not unresponsive (i.e. I can stop the build), but it never finishes the build either. The libraries and executables are all BSD static libraries or command-line applications written in C.
My project layout (advice appreciated) is currently as follows:
Workspace
Empty top-level project
libs-project (contains targets for 29 static libs needed by the main program, these also contain dependencies amongst themselves, but they're not declared here as it only matters in the final executable link stage)
main-project (contains a further 4 libs, 1 of which contains ~250 source files as well as the main executable target)
The main executable obviously links to most, if not all, of the libraries created in the other project. Seemingly during one of these dependent library builds, the hang occurs. If I set my current target directly to that library, it seems to compile and create the archive (.a) fine.
Secondly, we have variants of most of the libraries that are triggered by defines. One is the so-called DEVELOPMENT flag which enables options that are not yet ready for the release, and we have a second set (EULER_LAMINAR, TURBULENT_1EQU, TURBULENT_2EQU, ...) for building variants optimized for different turbulence models. Obviously the 2 sets of flags are orthogonal.
I'm not quite sure how to best reflect this in the project. I've found BUILD_VARIANTS but no idea how to use them, maybe Schemes could also be used for this purpose, but I wasn't quite sure how.
Right now I've simply created multiple targets for the affected libraries and executables with the defines set differently while the DEVELOPMENT define is set in the Debug configuration and not in Release (this is not ideal though, sometimes we want release builds with the flag). Also, is there a way to merge preprocessor defines (i.e. for the target add a define to the list of defines already set project-wide instead of them overwriting each other)?
Any advice would be welcome.
Thanks,
Daniel. _______________________________________________
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
--
_______________________________________________
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