Skip to content

Commit

Permalink
Install ipopt dependencies in ipopt folder to reduce unnecessary book…
Browse files Browse the repository at this point in the history
…-keeping
  • Loading branch information
Ayman authored and Ayman committed Sep 30, 2024
1 parent cbf9c74 commit 746eb70
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Vendors/tropter/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ if(TROPTER_COPY_DEPENDENCIES AND APPLE)
${ColPack_ROOT_DIR}/lib/libColPack.0.dylib
${IPOPT_LIBDIR}/libipopt.3.dylib
${IPOPT_LIBDIR}/libipopt.dylib
${IPOPT_LIBDIR}/../../mumps/lib/libcoinmumps.3.dylib
${IPOPT_LIBDIR}/../../mumps/lib/libcoinmumps.dylib
${IPOPT_LIBDIR}/../../metis/lib/libmetis.dylib
${IPOPT_LIBDIR}/libcoinmumps.3.dylib
${IPOPT_LIBDIR}/libcoinmumps.dylib
${IPOPT_LIBDIR}/libmetis.dylib

DESTINATION ${CMAKE_INSTALL_LIBDIR})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ execute_process(COMMAND bash "-c"
# tropter
install_name_tool_change(tropter adolc.2 "@ADOLC_DIR@/lib64")
install_name_tool_change(tropter ipopt.3 "@IPOPT_LIBDIR@")
install_name_tool_change(tropter coinmumps.3 "@IPOPT_LIBDIR@")
install_name_tool_change(tropter coinmetis.1 "@IPOPT_LIBDIR@")
install_name_tool_add_rpath(tropter)
#install_name_tool_change(tropter coinmumps.3 "@IPOPT_LIBDIR@")
#install_name_tool_change(tropter metis "@IPOPT_LIBDIR@")
#install_name_tool_add_rpath(tropter)

# adol-c
install_name_tool_id(adolc.2)
Expand All @@ -88,15 +88,15 @@ install_name_tool_delete_rpath(adolc.2 "@ColPack_ROOT_DIR@/lib")
# ipopt
install_name_tool_id(ipopt.3)
install_name_tool_change(ipopt.3 coinmumps.3 "@IPOPT_LIBDIR@")
install_name_tool_change(ipopt.3 coinmetis.1 "@IPOPT_LIBDIR@")
install_name_tool_change(ipopt.3 metis "@IPOPT_LIBDIR@")

# coinmumps
install_name_tool_id(coinmumps.3)
install_name_tool_change(coinmumps.3 coinmetis.1 "@IPOPT_LIBDIR@")
install_name_tool_change(coinmumps.3 metis "@IPOPT_LIBDIR@")
install_name_tool_change(coinmumps.3 "${libgcc_name}" "${libgcc_dir}")
install_name_tool_add_rpath(coinmumps.3)

# coinmetis
install_name_tool_id(coinmetis.1)
install_name_tool_add_rpath(coinmetis.1)
# metis
install_name_tool_id(metis)
install_name_tool_add_rpath(metis)

8 changes: 4 additions & 4 deletions dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ else()
ExternalProject_Add(metis
# URL http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
URL https://sourceforge.net/projects/myosin/files/metis-5.1.0.tar.gz/download
CONFIGURE_COMMAND cd <SOURCE_DIR> && ${CMAKE_MAKE_PROGRAM} shared=1 config "prefix=${CMAKE_INSTALL_PREFIX}/metis" BUILDDIR=bdir
CONFIGURE_COMMAND cd <SOURCE_DIR> && ${CMAKE_MAKE_PROGRAM} shared=1 config "prefix=${CMAKE_INSTALL_PREFIX}/ipopt" BUILDDIR=bdir
BUILD_COMMAND cd <SOURCE_DIR>/bdir && ${CMAKE_MAKE_PROGRAM}
INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/metis"
INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/ipopt"
INSTALL_COMMAND cd <SOURCE_DIR>/bdir && ${CMAKE_MAKE_PROGRAM} install)

# GCC 10 generates a warning when compling MUMPS that we must suppress using
Expand All @@ -346,15 +346,15 @@ else()
PATCH_COMMAND cd <SOURCE_DIR> && ./get.Mumps
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> ADD_FFLAGS=-fallow-argument-mismatch ADD_CFLAGS=-Wno-error=implicit-function-declaration
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} ${BUILD_FLAGS}
INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/mumps"
INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/ipopt"
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install)

ExternalProject_Add(ipopt
DEPENDS mumps metis
URL https://github.com/coin-or/Ipopt/archive/refs/tags/releases/3.14.16.zip
INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/ipopt"
# Suppress warnings treated as errors in Clang/LLVM with -Wno-error=implicit-function-declaration
CONFIGURE_COMMAND <SOURCE_DIR>/configure --with-mumps --prefix=<INSTALL_DIR> --with-mumps-cflags="-I${CMAKE_INSTALL_PREFIX}/mumps/include/coin-or/mumps" --with-mumps-lflags="-L${CMAKE_INSTALL_PREFIX}/mumps/lib -lcoinmumps"
CONFIGURE_COMMAND <SOURCE_DIR>/configure --with-mumps --prefix=<INSTALL_DIR> --with-mumps-cflags="-I${CMAKE_INSTALL_PREFIX}/ipopt/include/coin-or/mumps" --with-mumps-lflags="-L${CMAKE_INSTALL_PREFIX}/ipopt/lib -lcoinmumps"
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} ${BUILD_FLAGS}
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install)
endif()
Expand Down

0 comments on commit 746eb70

Please sign in to comment.