# HG changeset patch # User Alpar Juttner # Date 1427976561 -7200 # Node ID 27d7d232fbcce70d42cd7d0c8acf470449be41e4 # Parent 1ad592289f93c9e66b6a838360cdd43260c29096# Parent 043a787c3ceed658694f3ef5a446f0a91d36db6e Merge CPLEX 12.6 support diff -r 1ad592289f93 -r 27d7d232fbcc CMakeLists.txt --- a/CMakeLists.txt Wed Nov 12 14:11:20 2014 +0100 +++ b/CMakeLists.txt Thu Apr 02 14:09:21 2015 +0200 @@ -150,10 +150,13 @@ SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb") ELSEIF(MSVC) # This part is unnecessary 'casue the same is set by the lemon/core.h. - # Still keep it as an example. - SET(CXX_WARNING "/wd4250 /wd4355 /wd4503 /wd4800 /wd4996") + # Still kept as an example. + + # SET(CXX_WARNING "/wd4250 /wd4267 /wd4355 /wd4503 /wd4800 /wd4996") + # Suppressed warnings: # C4250: 'class1' : inherits 'class2::member' via dominance + # C4267: conversion from 'size_t' to 'type', possible loss of data # C4355: 'this' : used in base member initializer list # C4503: 'function' : decorated name length exceeded, name was truncated # C4800: 'type' : forcing value to bool 'true' or 'false' @@ -168,6 +171,7 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}") IF(MSVC) + SET(CMAKE_CXX_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}") SET( CMAKE_CXX_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING "Flags used by the C++ compiler during maintainer builds." ) diff -r 1ad592289f93 -r 27d7d232fbcc cmake/FindILOG.cmake --- a/cmake/FindILOG.cmake Wed Nov 12 14:11:20 2014 +0100 +++ b/cmake/FindILOG.cmake Thu Apr 02 14:09:21 2015 +0200 @@ -62,6 +62,8 @@ ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic ${ILOG_CPLEX_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic + ${ILOG_CPLEX_ROOT_DIR}/lib/x86_linux/static_pic + ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_linux/static_pic ${ILOG_CPLEX_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda NO_DEFAULT_PATH ) @@ -72,6 +74,8 @@ ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic ${ILOG_CONCERT_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic + ${ILOG_CONCERT_ROOT_DIR}/lib/x86_linux/static_pic + ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_linux/static_pic ${ILOG_CONCERT_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda NO_DEFAULT_PATH ) diff -r 1ad592289f93 -r 27d7d232fbcc lemon/arg_parser.h --- a/lemon/arg_parser.h Wed Nov 12 14:11:20 2014 +0100 +++ b/lemon/arg_parser.h Thu Apr 02 14:09:21 2015 +0200 @@ -26,6 +26,7 @@ #include #include #include +#include #include ///\ingroup misc diff -r 1ad592289f93 -r 27d7d232fbcc lemon/core.h --- a/lemon/core.h Wed Nov 12 14:11:20 2014 +0100 +++ b/lemon/core.h Thu Apr 02 14:09:21 2015 +0200 @@ -29,21 +29,16 @@ // Disable the following warnings when compiling with MSVC: // C4250: 'class1' : inherits 'class2::member' via dominance +// C4267: conversion from 'size_t' to 'type', possible loss of data // C4355: 'this' : used in base member initializer list // C4503: 'function' : decorated name length exceeded, name was truncated // C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning) // C4996: 'function': was declared deprecated #ifdef _MSC_VER -#pragma warning( disable : 4250 4355 4503 4800 4996 ) +#pragma warning( disable : 4250 4267 4355 4503 4800 4996 ) #endif -#ifdef __GNUC__ -#define GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) -#endif - -#if GCC_VERSION >= 40800 +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) // Needed by the [DI]GRAPH_TYPEDEFS marcos for gcc 4.8 #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #endif diff -r 1ad592289f93 -r 27d7d232fbcc lemon/counter.h --- a/lemon/counter.h Wed Nov 12 14:11:20 2014 +0100 +++ b/lemon/counter.h Thu Apr 02 14:09:21 2015 +0200 @@ -22,6 +22,8 @@ #include #include +#include + ///\ingroup timecount ///\file ///\brief Tools for counting steps and events diff -r 1ad592289f93 -r 27d7d232fbcc lemon/elevator.h --- a/lemon/elevator.h Wed Nov 12 14:11:20 2014 +0100 +++ b/lemon/elevator.h Thu Apr 02 14:09:21 2015 +0200 @@ -167,7 +167,7 @@ ///Return the number of items on level \c l. int onLevel(int l) const { - return _first[l+1]-_first[l]; + return static_cast(_first[l+1]-_first[l]); } ///Return true if level \c l is empty. bool emptyLevel(int l) const @@ -177,12 +177,12 @@ ///Return the number of items above level \c l. int aboveLevel(int l) const { - return _first[_max_level+1]-_first[l+1]; + return static_cast(_first[_max_level+1]-_first[l+1]); } ///Return the number of active items on level \c l. int activesOnLevel(int l) const { - return _last_active[l]-_first[l]+1; + return static_cast(_last_active[l]-_first[l]+1); } ///Return true if there is no active item on level \c l. bool activeFree(int l) const diff -r 1ad592289f93 -r 27d7d232fbcc lemon/radix_sort.h --- a/lemon/radix_sort.h Wed Nov 12 14:11:20 2014 +0100 +++ b/lemon/radix_sort.h Thu Apr 02 14:09:21 2015 +0200 @@ -328,7 +328,7 @@ typedef std::allocator Allocator; Allocator allocator; - int length = std::distance(first, last); + int length = static_cast(std::distance(first, last)); Key* buffer = allocator.allocate(2 * length); try { bool dir = true; diff -r 1ad592289f93 -r 27d7d232fbcc lemon/random.h --- a/lemon/random.h Wed Nov 12 14:11:20 2014 +0100 +++ b/lemon/random.h Thu Apr 02 14:09:21 2015 +0200 @@ -199,7 +199,7 @@ initState(init); - num = length > end - begin ? length : end - begin; + num = static_cast(length > end - begin ? length : end - begin); while (num--) { curr[0] = (curr[0] ^ ((curr[1] ^ (curr[1] >> (bits - 2))) * mul1)) + *it + cnt; @@ -213,7 +213,7 @@ --curr; } - num = length - 1; cnt = length - (curr - state) - 1; + num = length - 1; cnt = static_cast(length - (curr - state) - 1); while (num--) { curr[0] = (curr[0] ^ ((curr[1] ^ (curr[1] >> (bits - 2))) * mul2)) - cnt; diff -r 1ad592289f93 -r 27d7d232fbcc lemon/static_graph.h --- a/lemon/static_graph.h Wed Nov 12 14:11:20 2014 +0100 +++ b/lemon/static_graph.h Thu Apr 02 14:09:21 2015 +0200 @@ -203,7 +203,7 @@ built = true; node_num = n; - arc_num = std::distance(first, last); + arc_num = static_cast(std::distance(first, last)); node_first_out = new int[node_num + 1]; node_first_in = new int[node_num];