• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to configure targets or project style for my case?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to configure targets or project style for my case?


  • Subject: Re: How to configure targets or project style for my case?
  • From: Scott Tooker <email@hidden>
  • Date: Tue, 16 Nov 2004 16:59:22 -0800

So it sounds like your precomp files really just provide a set of #defines.

It appears that some of the defines (like #define qDebug 1) are something that could be set in a build style. For example, in the 'Development' build style you could set 'Preprocessor Macros' to '$(value) qDebug=1' (the $(value) means "insert the target's value for this setting here").

Then you'd just need 5 targets, and in each one set 'Preprocessor Macros' to 'KindOfThisTarget=1' (and so on). Now all the targets should be able to share the same prefix file.

This way you cut the number of targets you want to track in half.

There are also ways to set up your build styles so they build into different directories (search the list archives for more on this).

Scott

On Nov 9, 2004, at 4:45 PM, Norio Ota wrote:


Hi there,

The documentation, MovingProjectsToXcode, says "In fact, it’s recommended that you delete any redundant targets and move the differentiating flags from the prefix headers to the build style. The targets with the fewest settings are the best candidates to replace with a build style."

If my understanding of this sentence is correct, I feel like I must be able to configure my project simpler. But I don't come up with how. Then I post this message to get your help.

I have a project using CodeWarrior, and the project has 5 targets.
Each has debug and non-debug build. So as a result there is 10 to be built.
The codes for those targets are exactly same except their own prefix files.
In each prefix file there is a compile flag telling which product to be made.
For instance,


In prefix_1_debug.pch the flag is defined like below:
#define KindOfThisTarget   1
#define qDebug             1

In prefix_1_nonDebug.pch
#define KindOfThisTarget   1
#define qDebug             0

In prefix_2_debug.pch
#define KindOfThisTarget   2
#define qDebug             1

In prefix_2_nonDebug.pch
#define KindOfThisTarget   2
#define qDebug             0

so on.


And my codes use the value of 'KindOfThisTarget' and do their own tasks.
#if KindOfThisTarget == 1
DoJob1
#elif KindOfThisTarget == 2
DoJob2
#elif KindOfThisTarget == 3
DoJob3
....
....
#endif
#if qDebug
DoDebugJobHere
#endif


At first I thought I need to make those 10 targets as I do with Code Warrior, but
I feel like there are some smarter ways than I did.


Any suggestions would be very appreciated.

Thank you,
Norio Ota


_______________________________________________ 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


References: 
 >How to configure targets or project style for my case? (From: Norio Ota <email@hidden>)

  • Prev by Date: Re: Syntax / Code completion for PHP?
  • Next by Date: Mono .NET Compiler
  • Previous by thread: How to configure targets or project style for my case?
  • Next by thread: What Target for ARM9 or ColdFire
  • Index(es):
    • Date
    • Thread