Merge CPLEX 12.6 support
authorAlpar Juttner <alpar@cs.elte.hu>
Thu, 02 Apr 2015 14:09:21 +0200
changeset 133327d7d232fbcc
parent 1330 1ad592289f93
parent 1331 043a787c3cee
child 1335 39b6e65574c6
Merge CPLEX 12.6 support
     1.1 --- a/CMakeLists.txt	Wed Nov 12 14:11:20 2014 +0100
     1.2 +++ b/CMakeLists.txt	Thu Apr 02 14:09:21 2015 +0200
     1.3 @@ -150,10 +150,13 @@
     1.4      SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb")
     1.5    ELSEIF(MSVC)
     1.6      # This part is unnecessary 'casue the same is set by the lemon/core.h.
     1.7 -    # Still keep it as an example.
     1.8 -    SET(CXX_WARNING "/wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
     1.9 +    # Still kept as an example.
    1.10 +
    1.11 +    # SET(CXX_WARNING "/wd4250 /wd4267 /wd4355 /wd4503 /wd4800 /wd4996")
    1.12 +
    1.13      # Suppressed warnings:
    1.14      # C4250: 'class1' : inherits 'class2::member' via dominance
    1.15 +    # C4267: conversion from 'size_t' to 'type', possible loss of data
    1.16      # C4355: 'this' : used in base member initializer list
    1.17      # C4503: 'function' : decorated name length exceeded, name was truncated
    1.18      # C4800: 'type' : forcing value to bool 'true' or 'false'
    1.19 @@ -168,6 +171,7 @@
    1.20  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
    1.21  
    1.22  IF(MSVC)
    1.23 +  SET(CMAKE_CXX_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}")
    1.24    SET( CMAKE_CXX_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
    1.25      "Flags used by the C++ compiler during maintainer builds."
    1.26      )
     2.1 --- a/cmake/FindILOG.cmake	Wed Nov 12 14:11:20 2014 +0100
     2.2 +++ b/cmake/FindILOG.cmake	Thu Apr 02 14:09:21 2015 +0200
     2.3 @@ -62,6 +62,8 @@
     2.4    ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic
     2.5    ${ILOG_CPLEX_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic
     2.6    ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic
     2.7 +  ${ILOG_CPLEX_ROOT_DIR}/lib/x86_linux/static_pic
     2.8 +  ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_linux/static_pic
     2.9    ${ILOG_CPLEX_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda
    2.10    NO_DEFAULT_PATH
    2.11    )
    2.12 @@ -72,6 +74,8 @@
    2.13    ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic
    2.14    ${ILOG_CONCERT_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic
    2.15    ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic
    2.16 +  ${ILOG_CONCERT_ROOT_DIR}/lib/x86_linux/static_pic
    2.17 +  ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_linux/static_pic
    2.18    ${ILOG_CONCERT_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda
    2.19    NO_DEFAULT_PATH
    2.20    )
     3.1 --- a/lemon/arg_parser.h	Wed Nov 12 14:11:20 2014 +0100
     3.2 +++ b/lemon/arg_parser.h	Thu Apr 02 14:09:21 2015 +0200
     3.3 @@ -26,6 +26,7 @@
     3.4  #include <iostream>
     3.5  #include <sstream>
     3.6  #include <algorithm>
     3.7 +#include <lemon/core.h>
     3.8  #include <lemon/assert.h>
     3.9  
    3.10  ///\ingroup misc
     4.1 --- a/lemon/core.h	Wed Nov 12 14:11:20 2014 +0100
     4.2 +++ b/lemon/core.h	Thu Apr 02 14:09:21 2015 +0200
     4.3 @@ -29,21 +29,16 @@
     4.4  
     4.5  // Disable the following warnings when compiling with MSVC:
     4.6  // C4250: 'class1' : inherits 'class2::member' via dominance
     4.7 +// C4267: conversion from 'size_t' to 'type', possible loss of data
     4.8  // C4355: 'this' : used in base member initializer list
     4.9  // C4503: 'function' : decorated name length exceeded, name was truncated
    4.10  // C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
    4.11  // C4996: 'function': was declared deprecated
    4.12  #ifdef _MSC_VER
    4.13 -#pragma warning( disable : 4250 4355 4503 4800 4996 )
    4.14 +#pragma warning( disable : 4250 4267 4355 4503 4800 4996 )
    4.15  #endif
    4.16  
    4.17 -#ifdef __GNUC__
    4.18 -#define GCC_VERSION (__GNUC__ * 10000                   \
    4.19 -                     + __GNUC_MINOR__ * 100             \
    4.20 -                     + __GNUC_PATCHLEVEL__)
    4.21 -#endif
    4.22 -
    4.23 -#if GCC_VERSION >= 40800
    4.24 +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
    4.25  // Needed by the [DI]GRAPH_TYPEDEFS marcos for gcc 4.8
    4.26  #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
    4.27  #endif
     5.1 --- a/lemon/counter.h	Wed Nov 12 14:11:20 2014 +0100
     5.2 +++ b/lemon/counter.h	Thu Apr 02 14:09:21 2015 +0200
     5.3 @@ -22,6 +22,8 @@
     5.4  #include <string>
     5.5  #include <iostream>
     5.6  
     5.7 +#include <lemon/core.h>
     5.8 +
     5.9  ///\ingroup timecount
    5.10  ///\file
    5.11  ///\brief Tools for counting steps and events
     6.1 --- a/lemon/elevator.h	Wed Nov 12 14:11:20 2014 +0100
     6.2 +++ b/lemon/elevator.h	Thu Apr 02 14:09:21 2015 +0200
     6.3 @@ -167,7 +167,7 @@
     6.4      ///Return the number of items on level \c l.
     6.5      int onLevel(int l) const
     6.6      {
     6.7 -      return _first[l+1]-_first[l];
     6.8 +      return static_cast<int>(_first[l+1]-_first[l]);
     6.9      }
    6.10      ///Return true if level \c l is empty.
    6.11      bool emptyLevel(int l) const
    6.12 @@ -177,12 +177,12 @@
    6.13      ///Return the number of items above level \c l.
    6.14      int aboveLevel(int l) const
    6.15      {
    6.16 -      return _first[_max_level+1]-_first[l+1];
    6.17 +      return static_cast<int>(_first[_max_level+1]-_first[l+1]);
    6.18      }
    6.19      ///Return the number of active items on level \c l.
    6.20      int activesOnLevel(int l) const
    6.21      {
    6.22 -      return _last_active[l]-_first[l]+1;
    6.23 +      return static_cast<int>(_last_active[l]-_first[l]+1);
    6.24      }
    6.25      ///Return true if there is no active item on level \c l.
    6.26      bool activeFree(int l) const
     7.1 --- a/lemon/radix_sort.h	Wed Nov 12 14:11:20 2014 +0100
     7.2 +++ b/lemon/radix_sort.h	Thu Apr 02 14:09:21 2015 +0200
     7.3 @@ -328,7 +328,7 @@
     7.4        typedef std::allocator<Key> Allocator;
     7.5        Allocator allocator;
     7.6  
     7.7 -      int length = std::distance(first, last);
     7.8 +      int length = static_cast<int>(std::distance(first, last));
     7.9        Key* buffer = allocator.allocate(2 * length);
    7.10        try {
    7.11          bool dir = true;
     8.1 --- a/lemon/random.h	Wed Nov 12 14:11:20 2014 +0100
     8.2 +++ b/lemon/random.h	Thu Apr 02 14:09:21 2015 +0200
     8.3 @@ -199,7 +199,7 @@
     8.4  
     8.5          initState(init);
     8.6  
     8.7 -        num = length > end - begin ? length : end - begin;
     8.8 +        num = static_cast<int>(length > end - begin ? length : end - begin);
     8.9          while (num--) {
    8.10            curr[0] = (curr[0] ^ ((curr[1] ^ (curr[1] >> (bits - 2))) * mul1))
    8.11              + *it + cnt;
    8.12 @@ -213,7 +213,7 @@
    8.13            --curr;
    8.14          }
    8.15  
    8.16 -        num = length - 1; cnt = length - (curr - state) - 1;
    8.17 +        num = length - 1; cnt = static_cast<int>(length - (curr - state) - 1);
    8.18          while (num--) {
    8.19            curr[0] = (curr[0] ^ ((curr[1] ^ (curr[1] >> (bits - 2))) * mul2))
    8.20              - cnt;
     9.1 --- a/lemon/static_graph.h	Wed Nov 12 14:11:20 2014 +0100
     9.2 +++ b/lemon/static_graph.h	Thu Apr 02 14:09:21 2015 +0200
     9.3 @@ -203,7 +203,7 @@
     9.4        built = true;
     9.5  
     9.6        node_num = n;
     9.7 -      arc_num = std::distance(first, last);
     9.8 +      arc_num = static_cast<int>(std::distance(first, last));
     9.9  
    9.10        node_first_out = new int[node_num + 1];
    9.11        node_first_in = new int[node_num];