COIN-OR::LEMON - Graph Library

Ticket #87: cmake-2.patch

File cmake-2.patch, 830 bytes (added by Alpar Juttner, 17 years ago)
  • lemon/assert.h

    # HG changeset patch
    # User Akos Ladanyi <ladanyi@tmit.bme.hu>
    # Date 1208110545 -7200
    # Node ID fdf71f738b6de5710b44324b503148f75fd93b62
    # Parent  73bf871c5bdee83fcada58af29d0f76bfc1dc8cc
    Improved LEMON_FUNCTION_NAME macro.
    It should work fine with GCC and the MS C++ compilers. Otherwise it reverts to
    using the __func__ variable which is C99, but I couldn't find a better
    alternative.
    
    diff --git a/lemon/assert.h b/lemon/assert.h
    a b  
    103103#endif
    104104
    105105#ifndef LEMON_FUNCTION_NAME
    106 #  define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__)
     106#  if defined __GNUC__
     107#    define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__)
     108#  elif defined _MSC_VER
     109#    define LEMON_FUNCTION_NAME (__FUNCSIG__)
     110#  else
     111#    define LEMON_FUNCTION_NAME (__func__)
     112#  endif
    107113#endif
    108114
    109115#ifdef DOXYGEN