COIN-OR::LEMON - Graph Library

Ticket #295: warning-pragma.patch

File warning-pragma.patch, 1.5 KB (added by Akos Ladanyi, 15 years ago)

da70af8844b9

  • CMakeLists.txt

    # HG changeset patch
    # User Akos Ladanyi <ladanyi@tmit.bme.hu>
    # Date 1243509110 -3600
    # Node ID da70af8844b94b631d8334fa5b89c2e3db5af4f4
    # Parent  926c47568a563c11643a5ba30f4dc2c28624b361
    Suppress MSVC warnings using pragmas (#295)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    a b  
    1717FIND_PACKAGE(CPLEX)
    1818FIND_PACKAGE(COIN)
    1919
    20 IF(MSVC)
    21   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
    22 # Suppressed warnings:
    23 # C4250: 'class1' : inherits 'class2::member' via dominance
    24 # C4355: 'this' : used in base member initializer list
    25 # C4503: 'function' : decorated name length exceeded, name was truncated
    26 # C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
    27 # C4996: 'function': was declared deprecated
    28 ENDIF(MSVC)
    29 
    3020INCLUDE(CheckTypeSize)
    3121CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
    3222
  • lemon/core.h

    diff --git a/lemon/core.h b/lemon/core.h
    a b  
    2727#include <lemon/bits/traits.h>
    2828#include <lemon/assert.h>
    2929
     30// Disable the following warnings when compiling with MSVC:
     31// C4250: 'class1' : inherits 'class2::member' via dominance
     32// C4355: 'this' : used in base member initializer list
     33// C4503: 'function' : decorated name length exceeded, name was truncated
     34// C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
     35// C4996: 'function': was declared deprecated
     36#ifdef _MSC_VER
     37#pragma warning( disable : 4250 4355 4503 4800 4996 )
     38#endif
     39
    3040///\file
    3141///\brief LEMON core utilities.
    3242///