source: trunk/Cbc/test/Makefile.am @ 1467

Last change on this file since 1467 was 1467, checked in by lou, 10 years ago

Fix incorrect library order for osiUnitTest.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
RevLine 
[311]1# Copyright (C) 2006 International Business Machines and others.
2# All Rights Reserved.
3# This file is distributed under the Common Public License.
4
5## $Id: Makefile.am 1467 2010-06-10 00:13:31Z lou $
6
7# Author:  Andreas Waechter           IBM    2006-04-13
8
9AUTOMAKE_OPTIONS = foreign
10
11########################################################################
[324]12#                         unitTest for Cbc                             #
[311]13########################################################################
14
[1464]15CBC_TEST_TGTS = gamstests ositests
[311]16
[640]17if COIN_HAS_CLP
18  CBC_TEST_TGTS += test_cbc
19endif
20if CBC_BUILD_CBC_GENERIC
[1464]21if COIN_HAS_SAMPLE
[640]22  CBC_TEST_TGTS += test_cbc_generic
23endif
[1464]24endif
[311]25
[1464]26cbcflags =
27ositestsflags =
28if COIN_HAS_SAMPLE
29  cbcflags += -dirSample `$(CYGPATH_W) $(SAMPLE_DATA)`
30  ositestsflags += -mpsDir=`$(CYGPATH_W) $(SAMPLE_DATA)`
31endif
32cbcflags += -unitTest
33if COIN_HAS_MIPLIB3
34  cbcflags += -dirMiplib `$(CYGPATH_W) $(MIPLIB3_DATA)` -miplib
35endif
36if COIN_HAS_NETLIB
37  ositestsflags += -netlibDir=`$(CYGPATH_W) $(NETLIB_DATA)` -testOsiSolverInterface
38endif
39
[640]40# We are using the solver executables to do the unit test
41
42test: $(CBC_TEST_TGTS)
43
44test_cbc: ../src/cbc$(EXEEXT)
[1464]45        ../src/cbc$(EXEEXT) $(cbcflags)
[640]46
[1464]47if COIN_HAS_SAMPLE
[640]48test_cbc_generic: ../src/cbc-generic$(EXEEXT)
49        echo "A minimal test is all that cbc-generic can manage just yet."
50        ../src/cbc-generic$(EXEEXT) \
[1464]51            -directory `$(CYGPATH_W) $(SAMPLE_DATA)` -import p0033.mps -branch
52endif
53
[1052]54gamstests: gamsTest$(EXEEXT)
55        ./gamsTest$(EXEEXT)
[640]56
[372]57.PHONY: test
[311]58
[1464]59bin_PROGRAMS = gamsTest osiUnitTest
60
[1052]61gamsTest_SOURCES = gamsTest.cpp
[1464]62gamsTest_LDADD = ../src/libCbcSolver.la ../src/libCbc.la $(COINDEPEND_LIBS) $(ADDLIBS)
[1052]63gamsTest_LDFLAGS = -rpath $(libdir)
64
[1464]65AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/../src` $(COINDEPEND_CFLAGS)
[1052]66
67if COIN_HAS_CLP
[1464]68  AM_CPPFLAGS += $(CLP_CFLAGS)
69  gamsTest_LDADD += $(CLP_LIBS)
[1052]70endif
71
72if COIN_HAS_CPX
[1464]73  AM_CPPFLAGS += $(CPX_CFLAGS)
74  gamsTest_LDADD += $(CPX_LIBS)
[1052]75endif
76
77if COIN_HAS_DYLP
[1464]78  AM_CPPFLAGS += $(DYLP_CFLAGS)
79  gamsTest_LDADD += $(DYLP_LIBS)
[1052]80endif
81
82if COIN_HAS_GLPK
[1464]83  AM_CPPFLAGS += $(GLPK_CFLAGS)
84  gamsTest_LDADD += $(GLPK_LIBS)
[1052]85endif
86
87if COIN_HAS_MSK
[1464]88  AM_CPPFLAGS += $(MSK_CFLAGS)
89  gamsTest_LDADD += $(MSK_LIBS)
[1052]90endif
91
[1464]92# if COIN_HAS_SPX
93#   AM_CPPFLAGS += $(SPX_CFLAGS)
94#   gamsTest_LDADD += $(SPX_LIBS)
95# endif
[1052]96
97if COIN_HAS_VOL
[1464]98  AM_CPPFLAGS += $(VOL_CFLAGS)
99  gamsTest_LDADD += $(VOL_LIBS)
[1052]100endif
101
102if COIN_HAS_XPR
[1464]103  AM_CPPFLAGS += $(XPR_CFLAGS)
104  gamsTest_LDADD += $(XPR_LIBS)
[1052]105endif
106
107if COIN_HAS_ASL
[1464]108  AM_CPPFLAGS += $(ASL_CFLAGS)
109  gamsTest_LDADD += $(ASL_LIBS)
[1052]110endif
111
[1464]112########################################################################
113#                         unitTest for OsiCbc                          #
114########################################################################
[1052]115
[1464]116osiUnitTest_SOURCES = osiUnitTest.cpp OsiCbcSolverInterfaceTest.cpp
117
[1467]118osiUnitTest_LDADD = ../src/OsiCbc/libOsiCbc.la ../src/libCbc.la \
119    $(COINDEPEND_LIBS) $(OSITESTS_LIBS) $(ADDLIBS)
[1464]120
121AM_CPPFLAGS += $(OSITESTS_CFLAGS) \
122        -I`$(CYGPATH_W) $(srcdir)/../src/OsiCbc`
123
124ositests: osiUnitTest$(EXEEXT)
125        ./osiUnitTest$(EXEEXT) $(ositestsflags)
126
[311]127########################################################################
128#                          Cleaning stuff                              #
129########################################################################
130
131# Here we list everything that is not generated by the compiler, e.g.,
132# output files of a program
133
[312]134DISTCLEANFILES = yy.mps xx.mps
Note: See TracBrowser for help on using the repository browser.