Skip to content

Commit

Permalink
Picking solver during configure is fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
aykutbulut committed Aug 4, 2016
1 parent b92b7d0 commit 8579cb7
Show file tree
Hide file tree
Showing 10 changed files with 4,663 additions and 5,209 deletions.
25 changes: 23 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@

AUTOMAKE_OPTIONS = foreign

########################################################################
# Common Flags #
########################################################################

LDADD = $(CGLCONICLIB_LIBS)
DEPENDENCIES = $(CGLCONICLIB_DEPENDENCIES)
AM_CPPFLAGS = $(CGLCONICLIB_CFLAGS)


if IPOPT_IPM_SOLVER
AM_CPPFLAGS += -D__OSI_IPOPT__
endif

if MOSEK_IPM_SOLVER
AM_CPPFLAGS += -D__OSI_MOSEK__
endif

if CPLEX_IPM_SOLVER
AM_CPPFLAGS += -D__OSI_CPLEX__
endif

########################################################################
# Subdirectories #
########################################################################
Expand All @@ -25,8 +46,8 @@ SUBDIRS = src

# Here we need include all files that are not mentioned in other Makefiles
# EXTRA_DIST = examples/cgl1.cpp \
# examples/cgl_data_test.cpp \
# examples/Makefile.in
# examples/cgl_data_test.cpp \
# examples/Makefile.in
EXTRA_DIST =

########################################################################
Expand Down
23 changes: 17 additions & 6 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@IPOPT_IPM_SOLVER_TRUE@am__append_1 = -D__OSI_IPOPT__
@MOSEK_IPM_SOLVER_TRUE@am__append_2 = -D__OSI_MOSEK__
@CPLEX_IPM_SOLVER_TRUE@am__append_3 = -D__OSI_CPLEX__
DIST_COMMON = README $(am__configure_deps) \
$(srcdir)/BuildTools/Makemain.inc $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/cglconic-uninstalled.pc.in \
Expand All @@ -60,8 +63,8 @@ DIST_COMMON = README $(am__configure_deps) \
$(top_srcdir)/examples/Makefile.in AUTHORS COPYING ChangeLog \
INSTALL NEWS TODO config.guess config.sub depcomp install-sh \
ltmain.sh missing
@HAVE_EXTERNALS_TRUE@am__append_1 = Dependencies
@HAVE_EXTERNALS_TRUE@am__append_2 = .Dependencies-stamp
@HAVE_EXTERNALS_TRUE@am__append_4 = Dependencies
@HAVE_EXTERNALS_TRUE@am__append_5 = .Dependencies-stamp
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
Expand Down Expand Up @@ -388,6 +391,14 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
AUTOMAKE_OPTIONS = foreign

########################################################################
# Common Flags #
########################################################################
LDADD = $(CGLCONICLIB_LIBS)
DEPENDENCIES = $(CGLCONICLIB_DEPENDENCIES)
AM_CPPFLAGS = $(CGLCONICLIB_CFLAGS) $(am__append_1) $(am__append_2) \
$(am__append_3)

########################################################################
# Subdirectories #
########################################################################
Expand All @@ -406,9 +417,9 @@ SUBDIRS = src

# Here we need include all files that are not mentioned in other Makefiles
# EXTRA_DIST = examples/cgl1.cpp \
# examples/cgl_data_test.cpp \
# examples/Makefile.in
EXTRA_DIST = $(am__append_1)
# examples/cgl_data_test.cpp \
# examples/Makefile.in
EXTRA_DIST = $(am__append_4)

########################################################################
# Installation of the addlibs file #
Expand All @@ -423,7 +434,7 @@ addlibsdir = $(DESTDIR)$(datadir)/coin/doc/CglConic
CLEANFILES =

# Files that are generated and should be cleaned with make distclean
DISTCLEANFILES = $(am__append_2) $(VPATH_DISTCLEANFILES)
DISTCLEANFILES = $(am__append_5) $(VPATH_DISTCLEANFILES)
DocFiles = README AUTHORS LICENSE
DocInstallDir = $(datadir)/coin/doc/$(PACKAGE_NAME)
COIN_HAS_DOXYGEN = @COIN_HAS_DOXYGEN_TRUE@TRUE
Expand Down
9,487 changes: 4,445 additions & 5,042 deletions configure

Large diffs are not rendered by default.

49 changes: 26 additions & 23 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ AC_COIN_DEBUG_COMPILE(CglConic)

# Get the name of the C++ compiler and appropriate compiler options
AC_COIN_PROG_CXX
AC_LANG_PUSH(C++)

# Initialize automake and libtool
AC_COIN_INIT_AUTO_TOOLS

# Get the EXEXT variable for CYGWIN
AC_EXEEXT

#############################################################################
# COIN-OR components #
#############################################################################
Expand Down Expand Up @@ -95,11 +99,6 @@ if test $coin_has_osiipopt != yes ; then
AC_MSG_ERROR([Required package OsiIpopt is not available.])
fi

AC_COIN_CHECK_PACKAGE(Sample, [coindatasample])

AC_COIN_CHECK_PACKAGE_BLAS(CglConicLib)
AC_COIN_CHECK_PACKAGE_LAPACK(CglConicLib)

#############################################################################
# Third party solvers #
#############################################################################
Expand All @@ -108,38 +107,37 @@ AC_COIN_CHECK_PACKAGE_LAPACK(CglConicLib)
AC_COIN_CHECK_PACKAGE(Cplex, [osicplex], [CglConicLib])
AC_COIN_CHECK_PACKAGE(Mosek, [osimosek], [CglConicLib])


#############################################################################
# Check for IPM solver #
#############################################################################
AC_MSG_CHECKING([for CglConic default IPM solver])
AC_ARG_WITH([ipm-solver],
[AC_HELP_STRING([--with-ipm-solver@<:@=ipmsolver@:>@],
[specify the IPM solver in small
letters(default ipmsolver=ipopt)])],
[cglconic_ipm_solver=$withval],[cglconic_ipm_solver=ipopt])
[specify the IPM solver in small
letters(default ipmsolver=ipopt)])],
[cglconic_ipm_solver=$withval],[cglconic_ipm_solver=ipopt])

found_package=true
case $cglconic_ipm_solver in
ipopt)
AC_MSG_RESULT(Ipopt)
if [test $coin_has_osiipopt = unavailable || test $coin_has_osiipopt = skipping]; \
then
found_package=false
found_package=false
fi
;;
mosek)
AC_MSG_RESULT(Mosek)
if test $coin_has_mosek = false; \
then
found_package=false
found_package=false
fi
;;
cplex)
AC_MSG_RESULT(Cplex)
if test $coin_has_cplex = false; \
then
found_package=false
found_package=false
fi
;;
*)
Expand All @@ -158,6 +156,11 @@ test $coin_has_mosek = yes])
AM_CONDITIONAL(CPLEX_IPM_SOLVER,[test $cglconic_ipm_solver = cplex &&
test $coin_has_cplex = yes])

# Check thirdparty libraries
AC_COIN_CHECK_PACKAGE(Sample, [coindatasample])
AC_COIN_CHECK_PACKAGE_BLAS(CglConicLib)
AC_COIN_CHECK_PACKAGE_LAPACK(CglConicLib)

#############################################################################
# Solvers for unittesting #
#############################################################################
Expand Down Expand Up @@ -217,7 +220,7 @@ AC_COIN_VPATH_LINK(examples/ex1.mps)
# Check for doxygen #
#############################################################################

AC_COIN_DOXYGEN(CoinUtils Osi OsiConic Cgl)
AC_COIN_DOXYGEN(CoinUtils Osi OsiConic Cgl OsiIpopt)

##############################################################################
# Finishing up by writing all the output #
Expand All @@ -229,16 +232,16 @@ dnl AC_COIN_VPATH_LINK([test/CglTestData/capPlan1.mps test/CglTestData/l152lav.m
# Here list all the files that configure should create (except for the
# configuration header file)
AC_CONFIG_FILES([Makefile
examples/Makefile
src/Makefile
src/CglConicGD1/Makefile
src/CglConicGD2/Makefile
src/CglConicMIR/Makefile
src/CglConicOA/Makefile
src/CglConicIPM/Makefile
src/CglConicIPMint/Makefile
cglconic.pc
cglconic-uninstalled.pc])
examples/Makefile
src/Makefile
src/CglConicGD1/Makefile
src/CglConicGD2/Makefile
src/CglConicMIR/Makefile
src/CglConicOA/Makefile
src/CglConicIPM/Makefile
src/CglConicIPMint/Makefile
cglconic.pc
cglconic-uninstalled.pc])
AC_CONFIG_FILES([doxydoc/doxygen.conf])

# Here put the location and name of the configuration header file
Expand Down
Loading

0 comments on commit 8579cb7

Please sign in to comment.