Changeset 2882


Ignore:
Timestamp:
Nov 18, 2012, 4:24:54 AM (9 years ago)
Author:
Peter
Message:

add --enable-assert option (in configure)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r2881 r2882  
    308308  [AS_HELP_STRING([--enable-debug],[turn on debug options and code])])
    309309
     310# If neither --enable-assert nor --disable-assert, set enable_assert
     311# to same as enable_debug
     312AC_ARG_ENABLE([assert],
     313              [AS_HELP_STRING([--enable-assert], [turn on assertions])],
     314              [], [enable_assert=$enable_debug])
     315
    310316# we use prefix INTERNAL_ for variables that are solely needed for
    311317# building yat, i.e., they are not needed for a user of yat and are
     
    319325                [AC_DEFINE([GSL_RANGE_CHECK_OFF], [1],
    320326                           [Define to turn off GSL range checks])])
    321   AC_DEFINE([NDEBUG], [1], [Define to turn off assertions])
    322327  # If CXXFLAGS not set by user, set it to default value
    323328  AS_IF([test x$CXXFLAGS_set_by_user != xyes], [
    324329    YAT_CXX_ADD_FLAG([INTERNAL_CXXFLAGS],[-O3])
    325330  ])
     331])
     332
     333AS_IF([test x"$enable_assert" = x"no"], [
     334  AC_DEFINE([NDEBUG], [1], [Define to turn off assertions])
    326335])
    327336
Note: See TracChangeset for help on using the changeset viewer.