Re: Multiple processor, Xcode 3.0 race condition when building Derived Sources?
Re: Multiple processor, Xcode 3.0 race condition when building Derived Sources?
- Subject: Re: Multiple processor, Xcode 3.0 race condition when building Derived Sources?
- From: Jonas Maebe <email@hidden>
- Date: Fri, 22 Feb 2008 10:53:13 +0100
On 22 Feb 2008, at 04:03, Mike Marino wrote:
I have a project that generates derived sources in
$DERIVED_FILE_DIR (
generated with lex and yacc ). One generated file genFoo.m file
depends
upon another generated genFoo.h file. These files get generated in
the
correct order according to the build log, but an error occurs when
Xcode
attempts to compile genFoo.m that says genFoo.h cannot be found.
After the
build fails I have verified that genFoo.h does indeed exist within
$DERIVED_FILE_DIR. I am building on a Dual G5, so my conclusion is
that a
race condition occurs like:
If you are generating the .h file in a script phase, keep in mind that
Xcode does not guarantee the order of execution of script phases
within a single target in any way (save for between different script
phases in case one is defined as having input dependencies on the
output of another script phase).
If you want guarantee that a script phase is finished before a target
starts compiling, you have to put the script phase in its own
subtarget and then make your main target dependent on this subtarget.
The result is that you no longer have access to the actual settings of
this main target in your script phase of course, which can be quite a
pain.
Jonas
_______________________________________________
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