Commit 98dc1f79 authored by Dominik Bongartz's avatar Dominik Bongartz
Browse files

Updated to ipopt 3.12.12

parent 27fd6270
[submodule "dep/blas"]
path = dep/blas
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/blas.git
[submodule "dep/lapack"]
path = dep/lapack
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/lapack.git
[submodule "dep/mumps"]
path = dep/mumps
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/mumps.git
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(ipopt C CXX)
message("Checking files for IPOPT.")
project(ipopt C CXX)
set(IPOPT_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
include(${IPOPT_SRCDIR}/Config/IpoptConfig.cmake)
include(${IPOPT_SRCDIR}/Common/ipoptCommonCSources.cmake)
include(${IPOPT_SRCDIR}/Interfaces/ipoptInterfacesCSources.cmake)
include(${IPOPT_SRCDIR}/LinAlg/ipoptLinAlgCSources.cmake)
include(${IPOPT_SRCDIR}/contrib/ipoptContribCSources.cmake)
include(${IPOPT_SRCDIR}/Algorithm/ipoptAlgorithmCSources.cmake)
include(${IPOPT_SRCDIR}/Algorithm/Inexact/ipoptAlgorithmInexactCSources.cmake)
include(${IPOPT_SRCDIR}/Algorithm/LinearSolvers/ipoptAlgorithmLinSolvCSources.cmake)
include(${IPOPT_SRCDIR}/Algorithm/LinearSolvers/ipoptAlgorithmLinSolvFSources.cmake)
set(IPOPT_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/Ipopt-3.12.12/Ipopt/src)
include(IpoptConfig.cmake)
include(ipoptCommonCSources.cmake)
include(ipoptInterfacesCSources.cmake)
include(ipoptLinAlgCSources.cmake)
include(ipoptContribCSources.cmake)
include(ipoptAlgorithmCSources.cmake)
include(ipoptAlgorithmInexactCSources.cmake)
include(ipoptAlgorithmLinSolvCSources.cmake)
include(ipoptAlgorithmLinSolvFSources.cmake)
set(IPOPT_C_SOURCES
${IPOPT_COMMON_C_SOURCES}
${IPOPT_INTERFACES_C_SOURCES}
......@@ -48,18 +47,37 @@ set(IPOPT_DIR_LIST ${IPOPT_SRCDIR}/Algorithm
add_library(ipopt STATIC ${IPOPT_C_SOURCES})
target_include_directories(ipopt PUBLIC ${IPOPT_DIR_LIST} ${IPOPT_CONFIG_INCLUDE})
target_compile_options(ipopt PUBLIC "$<$<CONFIG:RELEASE>:/O2>;$<$<CONFIG:DEBUG>:/Od>;/MP;/Qpar;/wd4996")
set_target_properties(ipopt PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H -DIPOPT_BUILD -DCOIN_USE_MUMPS_MPI_H")
target_link_libraries(ipopt
# Turn off warnings and turn on optimization and parallel compilation
target_compile_options(ipopt
PUBLIC
$<$<C_COMPILER_ID:MSVC>: /MP;/Qpar;/wd4996>
$<$<C_COMPILER_ID:AppleClang>: -Wno-deprecated-declarations>
)
if(NOT(MSVC))
target_compile_options(ipopt
PRIVATE
$<$<CXX_COMPILER_ID:Intel>: $<$<NOT:$<CONFIG:DEBUG>>:-O3> $<$<CONFIG:DEBUG>:-O0>>
$<$<CXX_COMPILER_ID:GNU>: $<$<NOT:$<CONFIG:DEBUG>>:-O3> $<$<CONFIG:DEBUG>:-O0>>
$<$<CXX_COMPILER_ID:AppleClang>: $<$<NOT:$<CONFIG:DEBUG>>:-O3> $<$<CONFIG:DEBUG>:-O0>>
)
endif()
target_compile_definitions(ipopt PRIVATE
HAVE_CONFIG_H
IPOPT_BUILD
$<$<C_COMPILER_ID:MSVC>:_CRT_SECURE_NO_WARNINGS>
)
target_link_libraries(ipopt
PUBLIC
mumps
PRIVATE
$<$<C_COMPILER_ID:GNU>:gfortran>
$<$<C_COMPILER_ID:AppleClang>:gfortran>
$<$<C_COMPILER_ID:Intel>:ifcore>
blas
lapack
${CMAKE_DL_LIBS}
)
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# Add dependencies
......@@ -69,12 +87,12 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
message("LAPACK done.")
add_subdirectory(dep/mumps)
message("MUMPS done.")
if((NOT (DEFINED usePrecompiledMumps)) OR (NOT ${usePrecompiledMumps}))
if(MUMPS_buildWithMETIS AND ((NOT (DEFINED MUMPS_usePrecompiledDll)) OR (NOT ${MUMPS_usePrecompiledDll})))
add_subdirectory(dep/metis)
message("METIS done.")
endif()
# Test executables
# Test executables, the test ist an example problem from the Ipopt-3.12.12
add_executable(ipopt-test
${PROJECT_SOURCE_DIR}/test/hs071_main.cpp
${PROJECT_SOURCE_DIR}/test/hs071_nlp.cpp
......
language: cpp
matrix:
include:
- os: linux
addons:
apt:
packages:
- gfortran
- os: osx
osx_image: xcode10
env: OSX=10.13
compiler: clang
- os: osx
osx_image: xcode9.2
env: OSX=10.12
compiler: clang
- os: osx
osx_image: xcode8
env: OSX=10.11
compiler: clang
allow_failures:
- os: osx
before_script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install bash gcc; brew link --overwrite gcc; gfortran --version; fi
- git clone https://github.com/coin-or/COIN-OR-OptimizationSuite COIN
- cd COIN
- export PROJECT=`echo $TRAVIS_REPO_SLUG | cut -d "/" -f 2`
- bash ./coin.install.sh fetch --no-prompt --main-proj=$PROJECT > /dev/null
script:
- bash ./coin.install.sh build --no-prompt --main-proj=$PROJECT --verbosity=2 --test
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>$(SolutionDir)$(Platform)-$(PlatformToolset)-$(Configuration)\</OutDir>
<IntDir>$(Platform)-$(PlatformToolset)-$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<StringPooling>true</StringPooling>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="BuildTools"
ProjectGUID="{B0561BB4-37C0-4F82-BAC8-FAAF27F5B3A0}"
RootNamespace="BuildTools"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="10"
InheritedPropertySheets=".\coin.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="10"
InheritedPropertySheets=".\coin.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="10"
InheritedPropertySheets=".\coin.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="10"
InheritedPropertySheets=".\coin.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\headers\configall_system.h"
>
</File>
<File
RelativePath="..\..\headers\configall_system_msc.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<File
RelativePath=".\coin.vsprops"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
# Copyright (C) 2006, 2007 International Business Machines and others.
# All Rights Reserved.
# This file is distributed under the Eclipse Public License.
## $Id: Makemain.inc 3482 2015-03-26 03:06:39Z tkr $
# Author: Andreas Waechter IBM 2006-04-13
########################################################################
# Documentation installation #
########################################################################
DocFiles = README AUTHORS LICENSE
DocInstallDir = $(datadir)/coin/doc/$(PACKAGE_NAME)
COIN_HAS_DOXYGEN = @COIN_HAS_DOXYGEN_TRUE@TRUE
COIN_HAS_LATEX = @COIN_HAS_LATEX_TRUE@TRUE
doxygen-docs:
if test "$(COIN_HAS_DOXYGEN)" = TRUE; then \
if test -d "doxydoc/"; then \
doxygen doxydoc/doxygen.conf;\
fi;\
fi
pdf-doxygen-docs: doxygen-docs
if test "$(COIN_HAS_DOXYGEN)" = TRUE; then \
if test -d "doxydoc/latex"; then \
if test "$(COIN_HAS_LATEX)" = TRUE; then \
cd doxydoc/latex;\
$(MAKE) pdf;\
cd -;\
fi;\
fi;\
fi
clean-doxygen-docs:
if test -d "doxydoc/"; then \
cd doxydoc ;\
rm -rf html latex *.log *.tag;\
fi
install-doxygen-docs: doxygen-docs
if test "$(COIN_HAS_DOXYGEN)" = TRUE; then \
if test -d "doxydoc/"; then \
test -d "$(DESTDIR)$(DocInstallDir)/doxydoc" || $(mkdir_p) "$(DESTDIR)$(DocInstallDir)/doxydoc"; \
$(INSTALL_DATA) @coin_doxy_tagname@ "$(DESTDIR)$(DocInstallDir)/@coin_doxy_tagname@";\
if test -f "doxydoc/latex/refman.pdf"; then \
$(INSTALL_DATA) doxydoc/latex/refman.pdf "$(DESTDIR)$(DocInstallDir)";\
fi;\
if test -d "doxydoc/html"; then \
test -d "$(DESTDIR)$(DocInstallDir)/doxydoc/search/" || $(mkdir_p) "$(DESTDIR)$(DocInstallDir)/doxydoc/search/"; \
$(INSTALL_DATA) doxydoc/html/*.* "$(DESTDIR)$(DocInstallDir)/doxydoc";\
$(INSTALL_DATA) doxydoc/html/search/*.* "$(DESTDIR)$(DocInstallDir)/doxydoc/search";\
fi;\
fi;\
fi
uninstall-doxygen-docs:
if test -d "$(DESTDIR)$(DocInstallDir)/doxydoc/"; then \
rm -rf "$(DESTDIR)$(DocInstallDir)/doxydoc/"; \
fi
if test -f "$(DESTDIR)$(DocInstallDir)/refman.pdf"; then \
rm -f "$(DESTDIR)$(DocInstallDir)/refman.pdf"; \
fi
all-doxygen-docs:
for dir in $(subdirs) ; do \
do_project=true;\
for proj in $(COIN_SKIP_DOXYGEN); do\
if test $$dir = $$proj; then\
do_project=false;\
fi;\
done;\
if test -r $$dir/doxydoc & $$do_project = true; then \
(cd $$dir ; $(MAKE) doxygen-docs) \
fi ; \
done ;
clean-all-doxygen-docs:
for dir in $(subdirs) ; do \
if test -r $$dir/doxydoc ; then \
(cd $$dir ; $(MAKE) clean-doxygen-docs) \
fi ; \
done ;
install-all-doxygen-docs: all-doxygen-docs
for dir in $(subdirs) ; do \
do_project=true;\
for proj in $(COIN_SKIP_DOXYGEN); do\
if test $$dir = $$proj; then\
do_project=false;\
fi;\
done;\
if test -r $$dir/doxydoc & $$do_project = true; then \
(cd $$dir ; $(MAKE) install-doxygen-docs) \
fi ; \
done ;
uninstall-all-doxygen-docs:
for dir in $(subdirs) ; do \
if test -r $$dir/doxydoc ; then \
(cd $$dir ; $(MAKE) uninstall-doxygen-docs) \
fi ; \
done ;
install-doc: $(DocFiles)
test -z "$(DocInstallDir)" || $(mkdir_p) "$(DESTDIR)$(DocInstallDir)"
for file in $(DocFiles); do \
if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
if test -f "$$dir$$file"; then $(INSTALL_DATA) "$$dir$$file" "$(DESTDIR)$(DocInstallDir)/$$file"; fi; \
done
uninstall-doc:
for file in $(DocFiles); do \
rm -f "$(DESTDIR)$(DocInstallDir)/$$file"; \
done
########################################################################
# Maintainer Stuff #
########################################################################
if MAINTAINER_MODE
# Make sure acinclude is using most recent coin.m4
$(srcdir)/acinclude.m4: $(BUILDTOOLSDIR)/coin.m4
cat $(LIBTOOLM4) $< > $@
# Make sure the autotools scripts are up to date
$(AUX_DIR)/install-sh: $(BUILDTOOLSDIR)/install-sh
cp $< $@
$(AUX_DIR)/missing: $(BUILDTOOLSDIR)/missing
cp $< $@
$(AUX_DIR)/config.guess: $(BUILDTOOLSDIR)/config.guess
cp $< $@
$(AUX_DIR)/config.sub: $(BUILDTOOLSDIR)/config.sub
cp $< $@
$(AUX_DIR)/depcomp: $(BUILDTOOLSDIR)/depcomp
cp $< $@
$(AUX_DIR)/ltmain.sh: $(BUILDTOOLSDIR)/ltmain.sh
cp $< $@
# Take care of updating externals (if Dependencies file exists)
if HAVE_EXTERNALS
$(top_builddir)/Makefile: .Dependencies-stamp
.Dependencies-stamp: $(srcdir)/Dependencies
cd $(srcdir); BuildTools/set_externals Dependencies
touch .Dependencies-stamp
update-externals: .Dependencies-stamp
cd $(srcdir); svn update
endif
endif
if HAVE_EXTERNALS
EXTRA_DIST += Dependencies
DISTCLEANFILES += .Dependencies-stamp
endif
DISTCLEANFILES += $(VPATH_DISTCLEANFILES)
.PHONY: install-doc uninstall-doc update-externals
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
# Copyright (C) 2010 International Business Machines and others.
# All Rights Reserved.
# This file is distributed under the Eclipse Public License.
# It is part of the BuildTools project in COIN-OR (www.coin-or.org)
#
# $Id: commit_new_release 3599 2016-07-20 15:32:26Z stefan $
#
# Author: Andreas Waechter IBM 2007-06-21
# Modified by: Lou Hafer SFU 2008-04-17
# Lou Hafer SFU 2010-06-29 major rewrite
#set -x -v
set -e
# Know thy self. If there are no '/' chars in the command name, we're running
# in the current directory. Otherwise, strip the command name, leaving the
# prefix. Coin-functions is expected to live in the same directory. As of
# the original version (100602), this script doesn't need coin-functions,
# but this still has some value as a consistency check.
if expr "$0" : '.*/.*' >/dev/null 2>&1 ; then
cmdDir=`echo $0 | sed -e 's,\(.*\)/[^/]*,\1,'`
else
cmdDir='.'
fi
cmdDir=`cd $cmdDir ; pwd`
if test -r $cmdDir/coin-functions ; then
. $cmdDir/coin-functions
else
echo "Cannot find utility functions file coin-functions; exiting."
fi
# We need at least one parameter. The default is a dry run (dryRun = 1).
printHelp=0
dryRun=1
dirToCommit=
if test "$#" -eq 0; then
printHelp=1
else
# Process the parameters. A parameter without an opening `-' is assumed to be
# the spec for the directory to be committed. (Strip any trailing '/'. Some
# people add it, but the script doesn't expect it.)
while test $# -gt 0 && test $printHelp = 0 ; do
case "$1" in
-h* | --h*)
printHelp=1
;;
-c* | --c*)
dryRun=0
;;
-*) echo "$0: unrecognised command line switch '"$1"'."
printHelp=1
;;
*) dirToCommit=`echo $1 | sed -e 's,/$,,'`
;;
esac
shift
done
fi
# What are we committing?
if test -z "$dirToCommit" ; then
printHelp=1
fi
if test $printHelp = 1 ; then
cat <<EOF
usage: commit_new_release [-c] <directory_to_commit>
By default, commit_new_release is a dry run, printing the commands that
will be executed. When you're confident that everything looks right, use
the -c (--commit) flag to commit the release.
EOF
exit 1
fi
# Remember what was done during generation of the new release.
if test -r $dirToCommit/.new_release_data; then
. $dirToCommit/.new_release_data
else
echo ''
echo "Error: the file .new_release_data is not present in $dirToCommit."
echo 'Are you running commit_new_release in the same directory where you'
echo 'ran prepare_new_release?'
echo ''
exit 1
fi
# Confirm that we're in the proper directory.
currDir=`pwd`
if test "$currDir/$dirToCommit" != "$topBuildDir" ; then
echo "According to $dirToCommit/.new_release_data, the release candidate was assembled"
echo "in $topBuildDir."
echo "You have asked to commit $currDir/$dirToCommit."
echo "There is some confusion. Repository is unchanged."