• 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: Chris Espinosa <email@hidden>
  • Date: Tue, 10 Aug 2004 10:23:40 -0700

On Aug 10, 2004, at 9:53 AM, Marc Poirier wrote:

I am having trouble appending C flags to a build style. What I want is for:

-D NDEBUG

to be added to the "Other C Flags" for the Deployment build style but not Development build style. But I still want all of the "Other C Flags" that I have defined for the target in general to be used, too. So I just want -D NDEBUG to be added on to the list of other flags.

In Project Builder, there was an explicit way to do this. In the build settings view, you could click on the = between the build option and value and it would turn into a += to mean that you were appending a value. In Xcode, I've never found a way to do this. However, at least in 1.2, the behavior seemed to be what I wanted for "Other C Flags", it seemed to be appending. In Xcode 1.5, however, the value that I set in the Deployment style is wiping out what I set for the target in general rather than adding to it.

Does anyone know if this is just a change in 1.5 that I can't do anything about, or if there is some way to specify that I want my C flags appended?

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.

Chris
_______________________________________________
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.


References: 
 >appending C flags (From: Marc Poirier <email@hidden>)

  • Prev by Date: Xcode can't open .php file?
  • Next by Date: Re: linking an embedded framework under Xcode 1.5
  • Previous by thread: appending C flags
  • Next by thread: Re: appending C flags
  • Index(es):
    • Date
    • Thread