COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r1088 r1137  
    1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
     1CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
     2
     3IF(POLICY CMP0048)
     4  CMAKE_POLICY(SET CMP0048 OLD)
     5ENDIF(POLICY CMP0048)
     6
     7IF(POLICY CMP0026)
     8  #This is for copying the dll's needed by glpk (in lp_test and mip_test)
     9  CMAKE_POLICY(SET CMP0026 OLD)
     10ENDIF(POLICY CMP0026)
    211
    312SET(PROJECT_NAME "LEMON")
     
    6271FIND_PACKAGE(Doxygen)
    6372FIND_PACKAGE(Ghostscript)
     73
     74IF(WIN32)
     75  SET(LEMON_WIN32 TRUE)
     76ENDIF(WIN32)
    6477
    6578SET(LEMON_ENABLE_GLPK YES CACHE STRING "Enable GLPK solver backend.")
     
    122135  SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
    123136    "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)" FORCE)
     137ELSE()
     138  SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
     139    "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)")
    124140ENDIF()
    125141IF(NOT LEMON_DEFAULT_MIP OR
     
    129145  SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING
    130146    "Default MIP solver backend (GLPK, CPLEX or CBC)" FORCE)
     147ELSE()
     148  SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING
     149    "Default MIP solver backend (GLPK, CPLEX or CBC)")
    131150ENDIF()
    132151
     
    141160  ELSEIF(MSVC)
    142161    # This part is unnecessary 'casue the same is set by the lemon/core.h.
    143     # Still keep it as an example.
    144     SET(CXX_WARNING "/wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
     162    # Still kept as an example.
     163
     164    # SET(CXX_WARNING "/wd4250 /wd4267 /wd4355 /wd4503 /wd4800 /wd4996")
     165
    145166    # Suppressed warnings:
    146167    # C4250: 'class1' : inherits 'class2::member' via dominance
     168    # C4267: conversion from 'size_t' to 'type', possible loss of data
    147169    # C4355: 'this' : used in base member initializer list
    148170    # C4503: 'function' : decorated name length exceeded, name was truncated
     
    159181
    160182IF(MSVC)
     183  SET(CMAKE_CXX_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}")
    161184  SET( CMAKE_CXX_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
    162185    "Flags used by the C++ compiler during maintainer builds."
     
    181204    )
    182205  SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
    183     "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
     206    "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING
    184207    "Flags used for linking binaries during maintainer builds."
    185208    )
    186209  SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
    187     "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
     210    "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING
    188211    "Flags used by the shared libraries linker during maintainer builds."
    189212    )
Note: See TracChangeset for help on using the changeset viewer.