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

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

 



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




_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux