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

Last change on this file since 1501 was 1501, checked in by stefan, 9 years ago

change from COIN_HAS_MODULE to COIN_HAS_PACKAGE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 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 1501 2010-09-13 07:41:21Z 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 $(CBCLIB_LIBS)
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
107########################################################################
108#                         unitTest for OsiCbc                          #
109########################################################################
110
111osiUnitTest_SOURCES = osiUnitTest.cpp OsiCbcSolverInterfaceTest.cpp
112
113osiUnitTest_LDADD = ../src/OsiCbc/libOsiCbc.la ../src/libCbc.la \
114    $(CBCLIB_LIBS) $(OSITESTS_LIBS)
115
116AM_CPPFLAGS += $(OSITESTS_CFLAGS) \
117        -I`$(CYGPATH_W) $(srcdir)/../src/OsiCbc`
118
119ositests: osiUnitTest$(EXEEXT)
120        ./osiUnitTest$(EXEEXT) $(ositestsflags)
121
122########################################################################
123#                          Cleaning stuff                              #
124########################################################################
125
126# Here we list everything that is not generated by the compiler, e.g.,
127# output files of a program
128
129DISTCLEANFILES = yy.mps xx.mps
Note: See TracBrowser for help on using the repository browser.