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

Last change on this file since 1484 was 1467, checked in by lou, 9 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
Line 
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 stefan $
6
7# Author:  Andreas Waechter           IBM    2006-04-13
8
9AUTOMAKE_OPTIONS = foreign
10
11########################################################################
12#                         unitTest for Cbc                             #
13########################################################################
14
15CBC_TEST_TGTS = gamstests ositests
16
17if COIN_HAS_CLP
18  CBC_TEST_TGTS += test_cbc
19endif
20if CBC_BUILD_CBC_GENERIC
21if COIN_HAS_SAMPLE
22  CBC_TEST_TGTS += test_cbc_generic
23endif
24endif
25
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
40# We are using the solver executables to do the unit test
41
42test: $(CBC_TEST_TGTS)
43
44test_cbc: ../src/cbc$(EXEEXT)
45        ../src/cbc$(EXEEXT) $(cbcflags)
46
47if COIN_HAS_SAMPLE
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) \
51            -directory `$(CYGPATH_W) $(SAMPLE_DATA)` -import p0033.mps -branch
52endif
53
54gamstests: gamsTest$(EXEEXT)
55        ./gamsTest$(EXEEXT)
56
57.PHONY: test
58
59bin_PROGRAMS = gamsTest osiUnitTest
60
61gamsTest_SOURCES = gamsTest.cpp
62gamsTest_LDADD = ../src/libCbcSolver.la ../src/libCbc.la $(COINDEPEND_LIBS) $(ADDLIBS)
63gamsTest_LDFLAGS = -rpath $(libdir)
64
65AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/../src` $(COINDEPEND_CFLAGS)
66
67if COIN_HAS_CLP
68  AM_CPPFLAGS += $(CLP_CFLAGS)
69  gamsTest_LDADD += $(CLP_LIBS)
70endif
71
72if COIN_HAS_CPX
73  AM_CPPFLAGS += $(CPX_CFLAGS)
74  gamsTest_LDADD += $(CPX_LIBS)
75endif
76
77if COIN_HAS_DYLP
78  AM_CPPFLAGS += $(DYLP_CFLAGS)
79  gamsTest_LDADD += $(DYLP_LIBS)
80endif
81
82if COIN_HAS_GLPK
83  AM_CPPFLAGS += $(GLPK_CFLAGS)
84  gamsTest_LDADD += $(GLPK_LIBS)
85endif
86
87if COIN_HAS_MSK
88  AM_CPPFLAGS += $(MSK_CFLAGS)
89  gamsTest_LDADD += $(MSK_LIBS)
90endif
91
92# if COIN_HAS_SPX
93#   AM_CPPFLAGS += $(SPX_CFLAGS)
94#   gamsTest_LDADD += $(SPX_LIBS)
95# endif
96
97if COIN_HAS_VOL
98  AM_CPPFLAGS += $(VOL_CFLAGS)
99  gamsTest_LDADD += $(VOL_LIBS)
100endif
101
102if COIN_HAS_XPR
103  AM_CPPFLAGS += $(XPR_CFLAGS)
104  gamsTest_LDADD += $(XPR_LIBS)
105endif
106
107if COIN_HAS_ASL
108  AM_CPPFLAGS += $(ASL_CFLAGS)
109  gamsTest_LDADD += $(ASL_LIBS)
110endif
111
112########################################################################
113#                         unitTest for OsiCbc                          #
114########################################################################
115
116osiUnitTest_SOURCES = osiUnitTest.cpp OsiCbcSolverInterfaceTest.cpp
117
118osiUnitTest_LDADD = ../src/OsiCbc/libOsiCbc.la ../src/libCbc.la \
119    $(COINDEPEND_LIBS) $(OSITESTS_LIBS) $(ADDLIBS)
120
121AM_CPPFLAGS += $(OSITESTS_CFLAGS) \
122        -I`$(CYGPATH_W) $(srcdir)/../src/OsiCbc`
123
124ositests: osiUnitTest$(EXEEXT)
125        ./osiUnitTest$(EXEEXT) $(ositestsflags)
126
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
134DISTCLEANFILES = yy.mps xx.mps
Note: See TracBrowser for help on using the repository browser.