source: branches/split/Cbc/test/Makefile.am @ 1437

Last change on this file since 1437 was 1437, checked in by stefan, 11 years ago

use pkg-config to find dependencies

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 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 1437 2010-03-07 19:51:39Z 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
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 =
27if COIN_HAS_SAMPLE
28  cbcflags += -dirSample `$(CYGPATH_W) $(SAMPLE_DATA)`
29endif
30cbcflags += -unitTest
31if COIN_HAS_MIPLIB3
32  cbcflags += -dirMiplib `$(CYGPATH_W) $(MIPLIB3_DATA)` -miplib
33endif
34
35# We are using the solver executables to do the unit test
36
37test: $(CBC_TEST_TGTS)
38
39test_cbc: ../src/cbc$(EXEEXT)
40        ../src/cbc$(EXEEXT) $(cbcflags)
41
42if COIN_HAS_SAMPLE
43test_cbc_generic: ../src/cbc-generic$(EXEEXT)
44        echo "A minimal test is all that cbc-generic can manage just yet."
45        ../src/cbc-generic$(EXEEXT) \
46            -directory `$(CYGPATH_W) $(SAMPLE_DATA)` -import p0033.mps -branch
47endif
48
49gamstests: gamsTest$(EXEEXT)
50        ./gamsTest$(EXEEXT)
51
52.PHONY: test
53
54bin_PROGRAMS = gamsTest
55gamsTest_SOURCES = gamsTest.cpp
56gamsTest_LDADD = ../src/libCbcSolver.la ../src/libCbc.la $(COINDEPEND_LIBS) $(ADDLIBS)
57gamsTest_LDFLAGS = -rpath $(libdir)
58
59AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/../src` $(COINDEPEND_CFLAGS)
60
61if COIN_HAS_CLP
62  AM_CPPFLAGS += $(CLP_CFLAGS)
63  gamsTest_LDADD += $(CLP_LIBS)
64endif
65
66if COIN_HAS_CPX
67  AM_CPPFLAGS += $(CPX_CFLAGS)
68  gamsTest_LDADD += $(CPX_LIBS)
69endif
70
71if COIN_HAS_DYLP
72  AM_CPPFLAGS += $(DYLP_CFLAGS)
73  gamsTest_LDADD += $(DYLP_LIBS)
74endif
75
76if COIN_HAS_GLPK
77  AM_CPPFLAGS += $(GLPK_CFLAGS)
78  gamsTest_LDADD += $(GLPK_LIBS)
79endif
80
81if COIN_HAS_MSK
82  AM_CPPFLAGS += $(MSK_CFLAGS)
83  gamsTest_LDADD += $(MSK_LIBS)
84endif
85
86# if COIN_HAS_SPX
87#   AM_CPPFLAGS += $(SPX_CFLAGS)
88#   gamsTest_LDADD += $(SPX_LIBS)
89# endif
90
91if COIN_HAS_VOL
92  AM_CPPFLAGS += $(VOL_CFLAGS)
93  gamsTest_LDADD += $(VOL_LIBS)
94endif
95
96if COIN_HAS_XPR
97  AM_CPPFLAGS += $(XPR_CFLAGS)
98  gamsTest_LDADD += $(XPR_LIBS)
99endif
100
101if COIN_HAS_ASL
102  AM_CPPFLAGS += $(ASL_CFLAGS)
103  gamsTest_LDADD += $(ASL_LIBS)
104endif
105
106########################################################################
107#                          Cleaning stuff                              #
108########################################################################
109
110# Here we list everything that is not generated by the compiler, e.g.,
111# output files of a program
112
113DISTCLEANFILES = yy.mps xx.mps
Note: See TracBrowser for help on using the repository browser.