Skip to content

Commit

Permalink
IpoptMKL: new recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
dpo committed May 14, 2020
1 parent 86324cd commit 79a278a
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions I/IpoptMKL/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using BinaryBuilder

name = "Ipopt"
version = v"3.13.2"

sources = [
ArchiveSource("https://github.com/coin-or/Ipopt/archive/releases/$(version).tar.gz",
"891ab9e9c7db29fc8ac5c779ccec6313301098de7bbf735ca230cd5544c49496"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir
cd Ipopt-releases-*
# Remove misleading libtool files
rm -f ${prefix}/lib/*.la
rm -f /opt/${target}/${target}/lib*/*.la
LIBASL=(-L${libdir} -lasl)
if [[ "${target}" == *-linux-* ]]; then
LIBASL+=(-lrt)
fi
./configure --enable-shared \
--prefix=${prefix} \
--with-blas="-lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -ldl" \
--with-asl-cflags="-I${prefix}/include" \
--with-asl-lflags="${LIBASL[*]}" \
--host=${target}
# parallel build fails
make
make install
"""

platforms = [
Linux(:x86_64, libc=:glibc),
MacOS(:x86_64),
Windows(:i686),
Windows(:x86_64),
]
platforms = expand_gfortran_versions(expand_cxxstring_abis(platforms))

# The products that we will ensure are always built
products = [
LibraryProduct("libipopt", :libipopt),
ExecutableProduct("ipopt", :amplexe),
]

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("ASL_jll"),
Dependency("MKL_jll"),
Dependency("CompilerSupportLibraries_jll"),
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)

0 comments on commit 79a278a

Please sign in to comment.