• 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: appending C flags
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: appending C flags


  • Subject: Re: appending C flags
  • From: Marc Poirier <email@hidden>
  • Date: Tue, 10 Aug 2004 13:56:28 -0400

Thank you, Chris and Anders. Now I'm just trying to reconcile these 2 pieces of advice:



On Aug 10, 2004, at 10:23 AM, Chris Espinosa wrote:

In Xcode 1.5 (and 1.2) the per-target preprocessor macros have their
own Build Setting, so you don't have to stuff them into Other C Flags.

- Select your target
- Choose Get Info
- Click the Build tab
- Make sure the column header on th left reads "All Settings" (if it
doesn't, it's a popup menu; choose All Settings in the column header)
- In the Search bubble at the bottom, type prep

You'll see the Preprocessor Macros build setting.  Set its value to
NDEBUG, and that'll define NDEBUG for every compilation unit in that
target,

To set a preprocessor macro to a specific value, use the form NDEBUG=1

To set multiple preprocessor macros, click the Edit Setting button and
add each on its own line in the table that appears in the sheet, using
the "+" button to add new macro definitions.



On Aug 10, 2004, at 1:28 PM, Anders Bertelrud wrote:

There should be no difference between Xcode 1.2 and Xcode 1.5 in how a setting in a build style overrides a setting in a target. Certainly, we have made no deliberate changes in that area, and I have not heard of such an issue.

Now, there was definitely a change between Project Builder and Xcode: In Project Builder, there was a += / = toggle to click on, which was obvious but somewhat limiting (since you could only append, not prepend etc). In Xcode, the widget was removed but the special macro expansion "$(value)" was introduced. This lets you insert the overridden value anywhere in the string, e.g. "Other C Flags" = "-DABC $(value) -DDEF" would cause the overridden value to be inserted after the -DABC but before the -DDEF. While more flexible, this is unfortunately also much more hidden than the Project Builder way. We have definitely heard that feedback loud and clear, and we're considering ways of making it more obvious.



So it makes more sense then for me to use "preprocessor macros" than "other C flags", but then in that case, does the $(value) technique still work? I am wondering because the "preprocessor macros" setting is a different type of build setting, the type that let's you put in individual entries into a list rather than just 1 single string value, so I'm wondering, would I then make $(value) be one of the entries into the list in my Deployment style and then NDEBUG the other entry, or do I need to do something different for list-style build settings?


thanks again,
Marc
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: appending C flags
      • From: Scott Tooker <email@hidden>
  • Prev by Date: Re: Xcode can't open .php file?
  • Next by Date: Re: XCode and SourceForge
  • Previous by thread: Re: appending C flags
  • Next by thread: Re: appending C flags
  • Index(es):
    • Date
    • Thread