[Lemon-commits] Alpar Juttner: Merge fix #295

Lemon HG hg at lemon.cs.elte.hu
Fri May 29 09:20:47 CEST 2009


details:   http://lemon.cs.elte.hu/hg/lemon/rev/150004315af4
changeset: 718:150004315af4
user:      Alpar Juttner <alpar [at] cs.elte.hu>
date:      Thu May 28 16:59:51 2009 +0100
description:
	Merge fix #295

diffstat:

 CMakeLists.txt |  10 ----------
 lemon/core.h   |  10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (40 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,16 +17,6 @@
 FIND_PACKAGE(CPLEX)
 FIND_PACKAGE(COIN)
 
-IF(MSVC)
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
-# Suppressed warnings:
-# C4250: 'class1' : inherits 'class2::member' via dominance
-# 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
-ENDIF(MSVC)
-
 INCLUDE(CheckTypeSize)
 CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
 
diff --git a/lemon/core.h b/lemon/core.h
--- a/lemon/core.h
+++ b/lemon/core.h
@@ -27,6 +27,16 @@
 #include <lemon/bits/traits.h>
 #include <lemon/assert.h>
 
+// Disable the following warnings when compiling with MSVC:
+// C4250: 'class1' : inherits 'class2::member' via dominance
+// 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 )
+#endif
+
 ///\file
 ///\brief LEMON core utilities.
 ///



More information about the Lemon-commits mailing list