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

Last change on this file since 2054 was 2054, checked in by mlubin, 4 years ago

Force C++ linking for C interface test

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 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 2054 2014-08-08 04:07:42Z mlubin $
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 ctests
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 CInterfaceTest
60
61gamsTest_SOURCES = gamsTest.cpp
62gamsTest_LDADD = ../src/libCbcSolver.la ../src/libCbc.la $(CBCLIB_LIBS)
63gamsTest_DEPENDENCIES = ../src/libCbcSolver.la ../src/libCbc.la $(CBCLIB_DEPENDENCIES)
64
65AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/../src` $(COINDEPEND_CFLAGS)
66AM_CPPFLAGS += $(CLP_CFLAGS) $(CPX_CFLAGS) $(DYLP_CFLAGS) $(GLPK_CFLAGS) $(MSK_CFLAGS) $(VOL_CFLAGS) $(XPR_CFLAGS)
67
68# This line is necessary to allow VPATH compilation
69DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src
70
71########################################################################
72#                         unitTest for OsiCbc                          #
73########################################################################
74
75osiUnitTest_SOURCES = osiUnitTest.cpp OsiCbcSolverInterfaceTest.cpp
76
77osiUnitTest_LDADD = ../src/OsiCbc/libOsiCbc.la ../src/libCbc.la \
78    $(CBCLIB_LIBS) $(OSITESTS_LIBS)
79
80osiUnitTest_DEPENDENCIES = ../src/OsiCbc/libOsiCbc.la ../src/libCbc.la \
81    $(CBCLIB_DEPENDENCIES) $(OSITESTS_DEPENDENCIES)
82
83AM_CPPFLAGS += -I`$(CYGPATH_W) $(srcdir)/../src/OsiCbc` $(OSITESTS_CFLAGS)
84
85ositests: osiUnitTest$(EXEEXT)
86        ./osiUnitTest$(EXEEXT) $(ositestsflags)
87
88########################################################################
89#                         unitTest for CbcCInterface                   #
90########################################################################
91
92CInterfaceTest_SOURCES = CInterfaceTest.c
93nodist_EXTRA_CInterfaceTest_SOURCES = dummy.cpp # force using C++ linker
94
95CInterfaceTest_LDADD = ../src/libCbcSolver.la ../src/libCbc.la $(CBCLIB_LIBS)
96
97CInterfaceTest_DEPENDENCIES = ../src/libCbcSolver.la ../src/libCbc.la $(CBCLIB_DEPENDENCIES)
98
99ctests: CInterfaceTest$(EXEEXT)
100        ./CInterfaceTest$(EXEEXT)
101
102########################################################################
103#                          Cleaning stuff                              #
104########################################################################
105
106# Here we list everything that is not generated by the compiler, e.g.,
107# output files of a program
108
109DISTCLEANFILES = 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.