autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Conditionally set CXXFLAGS based on directory via 1 configure.ac?


From: Xochitl Lunde
Subject: Conditionally set CXXFLAGS based on directory via 1 configure.ac?
Date: Wed, 27 Jul 2011 22:13:01 +0000

I have a project like this:

Top Dir (configure.ac, etc.)
  - Source Dir
    -- Lib 1
    -- Lib 2
    -- Main Application
  - Test Dir
    -- Lib 1 Tests
    -- Lib 2 Tests

I need to set -fno-exceptions in everything under "Source Dir".  But I need to 
have -fexceptions in everything under "Test Dir".

I have tried putting -fexceptions in every Makefile.am under Test Dir.  This 
did not work because apparently -fexceptions is the default.  Everything in 
"Source Dir" still had exceptions.

I thought of having a nested configure for Test Dir, but I don't think that's 
the "right" way to do it.  It would not be very manageable for us to do that.

Is there a nice way to conditionally add -fno-exceptions to CXXFLAGS for the 
"Source Dir" from configure.ac or elsewhere?  I am sure I can go to each 
library under "Source Dir" and put -fno-exceptions in AM_CXXFLAGS, but is there 
a correct way to do it in configure.ac?

Thanks






reply via email to

[Prev in Thread] Current Thread [Next in Thread]