COIN-OR::LEMON - Graph Library

Changeset 1387:37d1b20cd9ef in lemon-0.x


Ignore:
Timestamp:
04/25/05 10:19:38 (14 years ago)
Author:
Akos Ladanyi
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1840
Message:
  • include config.h instead of manually adding -DHAVE_{CPLEX,GLPK} to CXXFLAGS
  • removed the checking of LpSkeleton? from lp_test.cc, because it is an abstract base class now
  • removed unnecessary LDFLAGS when linking with libemon.la
Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/demo/Makefile.am

    r1381 r1387  
    11AM_CPPFLAGS = -I$(top_srcdir)/src
    22LDADD = $(top_builddir)/src/lemon/libemon.la
    3 
    4 if HAVE_GLPK
    5 LP_CFLAGS = $(GLPK_CFLAGS) -DHAVE_GLPK
    6 LP_LIBS = $(GLPK_LIBS)
    7 else !HAVE_GLPK
    8 if HAVE_CPLEX
    9 LP_CFLAGS = $(CPLEX_CFLAGS) -DHAVE_CPLEX
    10 LP_LIBS = $(CPLEX_LIBS)
    11 endif HAVE_CPLEX
    12 endif !HAVE_GLPK
    13 
    143
    154EXTRA_DIST = sub_graph_wrapper_demo.dim
     
    4433
    4534lp_demo_SOURCES = lp_demo.cc
    46 lp_demo_CXXFLAGS = $(LP_CFLAGS)
    47 lp_demo_LDFLAGS = $(LP_LIBS)
     35lp_demo_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS)
    4836
    4937lp_maxflow_demo_SOURCES = lp_maxflow_demo.cc
    50 lp_maxflow_demo_CXXFLAGS = $(LP_CFLAGS)
    51 lp_maxflow_demo_LDFLAGS = $(LP_LIBS)
     38lp_maxflow_demo_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS)
  • src/demo/lp_demo.cc

    r1381 r1387  
     1#ifdef HAVE_CONFIG_H
     2#include <config.h>
     3#endif
     4
    15#include <iostream>
    26
  • src/demo/lp_maxflow_demo.cc

    r1381 r1387  
     1#ifdef HAVE_CONFIG_H
     2#include <config.h>
     3#endif
     4
    15#include<lemon/graph_reader.h>
    26#include<lemon/list_graph.h>
  • src/test/Makefile.am

    r1349 r1387  
    3636if HAVE_GLPK
    3737check_PROGRAMS += lp_test
    38 endif
     38else !HAVE_GLPK
     39if HAVE_CPLEX
     40check_PROGRAMS += lp_test
     41endif HAVE_CPLEX
     42endif !HAVE_GLPK
    3943
    4044TESTS = $(check_PROGRAMS)
     
    6367
    6468lp_test_SOURCES = lp_test.cc
    65 lp_test_CXXFLAGS = $(GLPK_CFLAGS)
    66 lp_test_LDFLAGS = $(GLPK_LIBS)
     69lp_test_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS)
  • src/test/lp_test.cc

    r1313 r1387  
    1 #include<lemon/lp_skeleton.h>
    2 #include<lemon/lp_glpk.h>
     1#ifdef HAVE_CONFIG_H
     2#include <config.h>
     3#endif
     4
     5#ifdef HAVE_GLPK
     6#include <lemon/lp_glpk.h>
     7#elif HAVE_CPLEX
     8#include <lemon/lp_cplex.h>
     9#endif
    310
    411using namespace lemon;
     12
     13#ifdef HAVE_GLPK
     14typedef LpGlpk LpDefault;
     15#elif HAVE_CPLEX
     16typedef LpCplex LpDefault;
     17#endif
    518
    619void lpTest(LpSolverBase & lp)
     
    130143int main()
    131144{
    132   LpSkeleton lp_skel;
    133   LpGlpk lp_glpk;
     145  LpDefault lp;
    134146
    135   lpTest(lp_skel);
    136   lpTest(lp_glpk);
     147  lpTest(lp);
    137148
    138149  return 0;
Note: See TracChangeset for help on using the changeset viewer.