Ignore:
Timestamp:
Oct 14, 2009, 2:34:04 AM (14 years ago)
Author:
Peter
Message:

fixes #564. Testing if boost is using long long. Testing to compile some code similar to the problematic one in and particuarly we include . The test is specific to GCC in the sense that -pedantic and -Werror are specific to GCC. In the case of using any other compiler the compilation test will still run and will likely run successfully. In any case the flags -pedantic -Werror and -Wno-long-long are added through YAT_CXX_ADD_FLAG, which implies the flags will only be added when the compiler supports it. I'm afraid the variable names (AM_CXXFLAGS) has changed in trunk, so the merge will need some massage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.5-stable/configure.ac

    r2042 r2079  
    267267fi
    268268
     269# some versions of boost uses long long - turn off compiler warnings
     270# with -Wno-long-long
     271yat_save_CXXFLAGS=$CXXFLAGS
     272# use -pedantic and friends in CXXFLAGS temporarily
     273CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS"
     274# turn warnings into errors
     275YAT_CXX_ADD_FLAG([CXXFLAGS], [-Werror])
     276AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
     277  [
     278    @%:@include <boost/iterator/transform_iterator.hpp>
     279    @%:@include <cmath>
     280    @%:@include <functional>
     281    @%:@include <vector>
     282  ],[
     283      using namespace boost;
     284      typedef std::pointer_to_unary_function<double, double> F;
     285      std::vector<double> vec;
     286      transform_iterator<F, std::vector<double>::iterator>
     287        i(vec.begin(), std::ptr_fun(fabs));
     288  ])],
     289[],
     290[YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-Wno-long-long])])
     291# restore CXXFLAGS
     292CXXFLAGS=$yat_save_CXXFLAGS
     293
    269294AC_ARG_ENABLE([svn-support],
    270295              [AS_HELP_STRING([--enable-svn-support],
Note: See TracChangeset for help on using the changeset viewer.