# HG changeset patch
# User Alpar Juttner <alpar@cs.elte.hu>
# Date 1540981897 -3600
# Wed Oct 31 11:31:37 2018 +0100
# Branch 1.3
# Node ID d6aa3c2ec62726ddaaf1da671bdaf433074513c4
# Parent e5af35e6c93ff93f73cbe6ab3eef8e6750518457
Suppress unused typef warnings (#615)
diff --git a/CMakeLists.txt b/CMakeLists.txt
a
|
b
|
|
148 | 148 | "Default MIP solver backend (GLPK, CPLEX or CBC)") |
149 | 149 | ENDIF() |
150 | 150 | |
| 151 | IF( ( ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND |
| 152 | ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER_EQUAL "4.8") ) |
| 153 | OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") |
| 154 | OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") |
| 155 | ) |
| 156 | SET(LEMON_NO_UNUSED_LOCAL_TYPEDEF_WARNINGS TRUE) |
| 157 | ENDIF() |
151 | 158 | |
152 | 159 | IF(DEFINED ENV{LEMON_CXX_WARNING}) |
153 | 160 | SET(CXX_WARNING $ENV{LEMON_CXX_WARNING}) |
154 | 161 | ELSE() |
155 | | IF(CMAKE_COMPILER_IS_GNUCXX) |
| 162 | IF( ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |
| 163 | OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") |
| 164 | OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") |
| 165 | ) |
156 | 166 | SET(CXX_WARNING "-Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas") |
157 | 167 | SET(CMAKE_CXX_FLAGS_DEBUG CACHE STRING "-ggdb") |
158 | 168 | SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb") |
diff --git a/lemon/config.h.in b/lemon/config.h.in
a
|
b
|
|
2 | 2 | #define LEMON_CONFIG_H |
3 | 3 | |
4 | 4 | #define LEMON_VERSION "@PROJECT_VERSION@" |
| 5 | |
5 | 6 | #cmakedefine LEMON_HAVE_LONG_LONG 1 |
6 | 7 | |
7 | 8 | #cmakedefine LEMON_WIN32 1 |
… |
… |
|
26 | 27 | #cmakedefine LEMON_USE_PTHREAD 1 |
27 | 28 | #cmakedefine LEMON_USE_WIN32_THREADS 1 |
28 | 29 | |
| 30 | #cmakedefine LEMON_NO_UNUSED_LOCAL_TYPEDEF_WARNINGS 1 |
| 31 | |
29 | 32 | #endif |
diff --git a/lemon/core.h b/lemon/core.h
a
|
b
|
|
33 | 33 | // C4503: 'function' : decorated name length exceeded, name was truncated |
34 | 34 | // C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning) |
35 | 35 | // C4996: 'function': was declared deprecated |
| 36 | |
| 37 | #include <lemon/config.h> |
| 38 | |
36 | 39 | #ifdef _MSC_VER |
37 | 40 | #pragma warning( disable : 4250 4267 4355 4503 4800 4996 ) |
38 | 41 | #endif |
39 | 42 | |
40 | | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) |
41 | | // Needed by the [DI]GRAPH_TYPEDEFS marcos for gcc 4.8 |
| 43 | #if LEMON_NO_UNUSED_LOCAL_TYPEDEF_WARNINGS |
| 44 | // Needed by the [DI]GRAPH_TYPEDEFS marcos for gcc >=4.8 and clang |
42 | 45 | #pragma GCC diagnostic ignored "-Wunused-local-typedefs" |
43 | 46 | #endif |
44 | 47 | |
45 | 48 | #include <vector> |
46 | 49 | #include <algorithm> |
47 | 50 | |
48 | | #include <lemon/config.h> |
49 | 51 | #include <lemon/bits/enable_if.h> |
50 | 52 | #include <lemon/bits/traits.h> |
51 | 53 | #include <lemon/assert.h> |