Changeset 3896


Ignore:
Timestamp:
Mar 30, 2020, 5:13:50 AM (2 months ago)
Author:
Peter
Message:

fixes #943, avoid compiler warning about deprecated boost header

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r3883 r3896  
    547547])
    548548
     549# Some versions of boost includes deprecated boost header, triggering
     550# compiler warnings (see ticket #943)
     551
     552
     553yat_save_CPPFLAGS=$CPPFLAGS
     554CPPFLAGS="$INTERNAL_CPPFLAGS $CPPFLAGS"
     555yat_save_CXXFLAGS=$CXXFLAGS
     556CXXFLAGS="$INTERNAL_CXXFLAGS $CXXFLAGS"
     557AC_MSG_CHECKING([whether boost headers include deprecated boost headers])
     558AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
     559    [@%:@include <boost/random/negative_binomial_distribution.hpp>],
     560    [])
     561  ], [
     562    AC_MSG_RESULT([no])
     563  ], [
     564    AC_MSG_RESULT([yes])
     565    AC_DEFINE([YAT_BOOST_ALLOW_DEPRECATED_HEADERS], [1],
     566              [Define if deprecated boost headers should be allowed])
     567])
     568CPPFLAGS=${save_CPPFLAGS}
     569CXXFLAGS=${save_CXXFLAGS}
     570
    549571#doxygen stuff
    550572DX_HTML_OUTPUT=html
  • trunk/test/negative_binomial_distribution.cc

    r3895 r3896  
    2121
    2222#include <config.h>
     23
     24#ifdef YAT_BOOST_ALLOW_DEPRECATED_HEADERS
     25  #define BOOST_ALLOW_DEPRECATED_HEADERS 1
     26#endif
    2327
    2428#include "Suite.h"
Note: See TracChangeset for help on using the changeset viewer.