File: Makefile.am

package info (click to toggle)
coinor-vol 1.5.4-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 10,616 kB
  • sloc: cpp: 44,110; sh: 11,238; makefile: 664; ansic: 35
file content (117 lines) | stat: -rw-r--r-- 3,882 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Copyright (C) 2006 International Business Machines and others.
# All Rights Reserved.
# This file is distributed under the Eclipse Public License.

## $Id: Makefile.am 1800 2011-08-14 10:37:34Z stefan $

# Author:  Andreas Waechter           IBM    2006-04-13

AUTOMAKE_OPTIONS = foreign

########################################################################
#                         unitTest for Coin                            #
########################################################################

noinst_PROGRAMS = unitTest

unitTest_SOURCES = unitTest.cpp \
  OsiTestSolver.cpp \
  OsiTestSolverInterface.cpp \
  OsiTestSolverInterfaceIO.cpp \
  OsiTestSolverInterfaceTest.cpp

# List libraries of COIN projects
unitTest_LDADD        = ../src/OsiCommonTest/libOsiCommonTests.la
unitTest_DEPENDENCIES = ../src/OsiCommonTest/libOsiCommonTests.la

# Here list all include flags, relative to this "srcdir" directory.  This
# "cygpath" stuff is necessary to compile with native compilers on Windows
AM_CPPFLAGS = \
	-I`$(CYGPATH_W) $(srcdir)/../src/Osi` \
	-I`$(CYGPATH_W) $(srcdir)/../src/OsiCommonTest` \
	$(COINUTILS_CFLAGS)

# This line is necessary to allow VPATH compilation
DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Osi

# Depending of what solvers are available, we add the corresponding files,
# libraries and include dirs

if COIN_HAS_CPX
  unitTest_SOURCES += OsiCpxSolverInterfaceTest.cpp
  AM_CPPFLAGS += -I`$(CYGPATH_W) $(CPXINCDIR)` \
	-I`$(CYGPATH_W) $(srcdir)/../src/OsiCpx`
  unitTest_LDADD += ../src/OsiCpx/libOsiCpx.la
  unitTest_DEPENDENCIES += ../src/OsiCpx/libOsiCpx.la
  LIBS += $(CPXLIB)
endif

if COIN_HAS_GLPK
  unitTest_SOURCES += OsiGlpkSolverInterfaceTest.cpp
  AM_CPPFLAGS += $(GLPK_CFLAGS) \
	-I`$(CYGPATH_W) $(srcdir)/../src/OsiGlpk`
  unitTest_LDADD += ../src/OsiGlpk/libOsiGlpk.la
  unitTest_DEPENDENCIES += ../src/OsiGlpk/libOsiGlpk.la
  LIBS += $(GLPK_LIBS)
endif

if COIN_HAS_MSK
  unitTest_SOURCES += OsiMskSolverInterfaceTest.cpp
  AM_CPPFLAGS += -I`$(CYGPATH_W) $(MSKINCDIR)` \
	-I`$(CYGPATH_W) $(srcdir)/../src/OsiMsk`
  unitTest_LDADD += ../src/OsiMsk/libOsiMsk.la
  unitTest_DEPENDENCIES += ../src/OsiMsk/libOsiMsk.la
  LIBS += $(MSKLIB)
endif

if COIN_HAS_XPR
  unitTest_SOURCES += OsiXprSolverInterfaceTest.cpp
  AM_CPPFLAGS += -I`$(CYGPATH_W) $(XPRINCDIR)` \
	-I`$(CYGPATH_W) $(srcdir)/../src/OsiXpr`
  unitTest_LDADD += ../src/OsiXpr/libOsiXpr.la
  unitTest_DEPENDENCIES += ../src/OsiXpr/libOsiXpr.la
  LIBS += $(XPRLIB)
endif

if COIN_HAS_GRB
  unitTest_SOURCES += OsiGrbSolverInterfaceTest.cpp
  AM_CPPFLAGS += -I`$(CYGPATH_W) $(GRBINCDIR)` \
	-I`$(CYGPATH_W) $(srcdir)/../src/OsiGrb`
  unitTest_LDADD += ../src/OsiGrb/libOsiGrb.la
  unitTest_DEPENDENCIES += ../src/OsiGrb/libOsiGrb.la
  LIBS += $(GRBLIB)
endif

if COIN_HAS_SOPLEX
  unitTest_SOURCES += OsiSpxSolverInterfaceTest.cpp
  AM_CPPFLAGS += $(SOPLEX_CFLAGS) \
	-I`$(CYGPATH_W) $(srcdir)/../src/OsiSpx`
  unitTest_LDADD += ../src/OsiSpx/libOsiSpx.la
  unitTest_DEPENDENCIES += ../src/OsiSpx/libOsiSpx.la
  LIBS += $(SOPLEX_LIBS)
endif

unitTest_LDADD        += ../src/Osi/libOsi.la $(OSILIB_LIBS)
unitTest_DEPENDENCIES += ../src/Osi/libOsi.la $(OSILIB_DEPENDENCIES)

unittestflags =
if COIN_HAS_SAMPLE
  unittestflags += -mpsDir=`$(CYGPATH_W) $(SAMPLE_DATA)`
endif
if COIN_HAS_NETLIB
  unittestflags += -netlibDir=`$(CYGPATH_W) $(NETLIB_DATA)` -testOsiSolverInterface
endif

test: unitTest$(EXEEXT)
	./unitTest$(EXEEXT) $(unittestflags)

.PHONY: test

########################################################################
#                          Cleaning stuff                              #
########################################################################

# Here we list everything that is not generated by the compiler, e.g.,
# output files of a program

DISTCLEANFILES = *.mps *.mps.gz *.lp test2out *.out.gz *.out