source: branches/autotools-update/Cbc/test/Makefile.am @ 2390

Last change on this file since 2390 was 2390, checked in by lou, 10 months ago

Bring Cbc into the autotools-update world. Rough, many options untested.

  • 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 Eclipse Public License.
4
5## $Id: Makefile.am 2390 2018-10-12 20:08:58Z lou $
6
7# Author:  Andreas Waechter           IBM    2006-04-13
8
9AUTOMAKE_OPTIONS = foreign
10
11include $(top_srcdir)/BuildTools/Makemain.inc
12
13########################################################################
14#                         unitTest for Cbc                             #
15########################################################################
16
17CBC_TEST_TGTS = gamstests ositests
18
19if COIN_HAS_CLP
20  CBC_TEST_TGTS += test_cbc ctests
21endif
22
23if CBC_BUILD_CBC_GENERIC
24if COIN_HAS_SAMPLE
25  CBC_TEST_TGTS += test_cbc_generic
26endif
27endif
28
29cbcflags =
30ositestsflags =
31if COIN_HAS_SAMPLE
32  cbcflags += -dirSample `$(CYGPATH_W) $(SAMPLE_DATA)`
33  ositestsflags += -mpsDir=`$(CYGPATH_W) $(SAMPLE_DATA)`
34endif
35cbcflags += -unitTest
36if COIN_HAS_MIPLIB3
37  cbcflags += -dirMiplib `$(CYGPATH_W) $(MIPLIB3_DATA)` -miplib
38endif
39if COIN_HAS_NETLIB
40  ositestsflags += -netlibDir=`$(CYGPATH_W) $(NETLIB_DATA)` -testOsiSolverInterface
41endif
42
43# We are using the solver executables to do the unit test
44
45test: $(CBC_TEST_TGTS)
46
47test_cbc: ../src/cbc$(EXEEXT)
48        ../src/cbc$(EXEEXT) $(cbcflags)
49
50if COIN_HAS_SAMPLE
51test_cbc_generic: ../src/cbc-generic$(EXEEXT)
52        echo "A minimal test is all that cbc-generic can manage just yet."
53        ../src/cbc-generic$(EXEEXT) \
54            -directory `$(CYGPATH_W) $(SAMPLE_DATA)` -import p0033.mps -branch
55endif
56
57gamstests: gamsTest$(EXEEXT)
58        ./gamsTest$(EXEEXT)
59
60.PHONY: test
61
62bin_PROGRAMS = gamsTest osiUnitTest CInterfaceTest
63
64gamsTest_SOURCES = gamsTest.cpp
65gamsTest_LDADD = ../src/libCbcSolver.la ../src/libCbc.la $(CBCLIB_LFLAGS)
66
67AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/../src` $(CBCLIB_CFLAGS)
68# AM_CPPFLAGS += $(CLP_CFLAGS) $(CPX_CFLAGS) $(DYLP_CFLAGS) $(GLPK_CFLAGS) $(MSK_CFLAGS) $(VOL_CFLAGS) $(XPR_CFLAGS)
69
70########################################################################
71#                         unitTest for OsiCbc                          #
72########################################################################
73
74osiUnitTest_SOURCES = osiUnitTest.cpp OsiCbcSolverInterfaceTest.cpp
75
76osiUnitTest_LDADD = ../src/OsiCbc/libOsiCbc.la ../src/libCbc.la \
77    $(CBCUNITTEST_LFLAGS)
78
79AM_CPPFLAGS += -I`$(CYGPATH_W) $(srcdir)/../src/OsiCbc` $(CBCUNITTEST_CFLAGS)
80
81ositests: osiUnitTest$(EXEEXT)
82        ./osiUnitTest$(EXEEXT) $(ositestsflags)
83
84########################################################################
85#                         unitTest for CbcCInterface                   #
86########################################################################
87
88CInterfaceTest_SOURCES = CInterfaceTest.c
89nodist_EXTRA_CInterfaceTest_SOURCES = dummy.cpp # force using C++ linker
90
91CInterfaceTest_LDADD = ../src/libCbcSolver.la ../src/libCbc.la $(CBCLIB_LFLAGS)
92
93ctests: CInterfaceTest$(EXEEXT)
94        ./CInterfaceTest$(EXEEXT)
95
96########################################################################
97#                          Cleaning stuff                              #
98########################################################################
99
100# Here we list everything that is not generated by the compiler, e.g.,
101# output files of a program
102
103DISTCLEANFILES = yy.mps xx.mps continuous.mps integer.mps test2.lp test2.out test.lp test.mps test.out x1.mps.mps x2.mps.mps x3.mps.mps
Note: See TracBrowser for help on using the repository browser.