librelist archives

« back to archive

Set compiler flag in brew file

Set compiler flag in brew file

From:
Stefan Schwandter
Date:
2012-01-18 @ 11:27
Hi all!


I ran into bug https://github.com/mxcl/homebrew/issues/9279 when I made a 
brew-file for itpp. For some reason, -DNDEBUG is not put into the CXXFLAGS
when I compile using brew, while it is put there automatically by 
configure when I compile it without brew.

What's the best way to set such a flag in a brew file?


Best,
Stefan

Re: [homebrew] Set compiler flag in brew file

From:
Charlie Sharpsteen
Date:
2012-01-18 @ 15:40
On Wednesday, January 18, 2012, Stefan Schwandter <s.schwandter@me.com>
wrote:
> Hi all!
>
>
> I ran into bug https://github.com/mxcl/homebrew/issues/9279 when I made a
brew-file for itpp. For some reason, -DNDEBUG is not put into the CXXFLAGS
when I compile using brew, while it is put there automatically by configure
when I compile it without brew.
>
> What's the best way to set such a flag in a brew file?
>
>
> Best,
> Stefan

Adding `ENV.append 'CXXFLAGS', '-DNDEBUG'` to the begInning of the install
block should do the trick.

-Charlie

Re: [homebrew] Set compiler flag in brew file

From:
Stefan Schwandter
Date:
2012-01-18 @ 16:49
> Adding `ENV.append 'CXXFLAGS', '-DNDEBUG'` to the begInning of the 
install block should do the trick.

Thanks a lot, Charlie, that works!


Stefan