Commit 76797c03 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Use the git repo for Coin-Clp

The website is down too often
parent 727dcd94
......@@ -368,12 +368,16 @@ endif()
# Coin-Clp for linear programing
get_filename_component(COIN_CLP_CXX ${CMAKE_CXX_COMPILER} NAME)
set(COIN_UTILS_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/CoinUtils/build/")
set(COIN_UTILS_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/CoinUtils/bin/")
set(COIN_UTILS_INCLUDE_DIRS "${COIN_UTILS_INSTALL_DIR}/include/coin")
set(COIN_UTILS_LIBRARY_DIRS "${CMAKE_INSTALL_PREFIX}/lib/coin-or/")
set(COIN_CLP_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/coin-Clp/build/")
set(COIN_CLP_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/coin-Clp/bin/")
set(COIN_CLP_INCLUDE_DIRS "${COIN_CLP_INSTALL_DIR}/include/;${COIN_CLP_INSTALL_DIR}/include/coin")
set(COIN_CLP_INCLUDE_DIRS "${COIN_CLP_INSTALL_DIR}/include/")
set(COIN_CLP_LIBRARY_DIRS "${CMAKE_INSTALL_PREFIX}/lib/coin-or/")
set(COIN_CLP_BLAS_LAPACK_LIBS "-L${LAPACK_DIR}")
set(COIN_CLP_URL "https://www.coin-or.org/download/source/Clp/Clp-1.17.6.tgz")
foreach(LAPACK_LIB_FILE IN LISTS LAPACK_LIBRARIES)
get_filename_component(LAPACK_LIB ${LAPACK_LIB_FILE} NAME_WE)
......@@ -382,21 +386,41 @@ foreach(LAPACK_LIB_FILE IN LISTS LAPACK_LIBRARIES)
endforeach()
set(COIN_CLP_BLAS_LAPACK_LIBS "${COIN_CLP_BLAS_LAPACK_LIBS}")
message(STATUS "COIN_CLP_BLAS_LAPACK_LIBS = ${COIN_CLP_BLAS_LAPACK_LIBS}")
set(COIN_CLP_CONFIGURE_COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/cmake/coin-Clp/clp_configure.sh ${COIN_CLP_INSTALL_DIR} ${COIN_CLP_BLAS_LAPACK_LIBS} ${COIN_CLP_CXX} ${COIN_CLP_LIBRARY_DIRS})
set(COIN_CLP_CONFIGURE_COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/cmake/coin-Clp/clp_configure.sh ${COIN_CLP_INSTALL_DIR} ${COIN_CLP_BLAS_LAPACK_LIBS} ${COIN_CLP_CXX} ${COIN_CLP_LIBRARY_DIRS} "${COIN_UTILS_LIBRARY_DIRS}/libCoinUtils.so" ${COIN_UTILS_INCLUDE_DIRS})
set(COIN_UTILS_CONFIGURE_COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/cmake/CoinUtils/coin_utils_configure.sh ${COIN_UTILS_INSTALL_DIR} ${COIN_CLP_BLAS_LAPACK_LIBS} ${COIN_CLP_CXX} ${COIN_CLP_LIBRARY_DIRS})
set(COIN_UTILS_MAKE_INSTALL_COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/cmake/CoinUtils/coin_utils_make_install.sh ${COIN_UTILS_LIBRARY_DIRS}/libCoinUtils.so)
set(COIN_CLP_MAKE_INSTALL_COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/cmake/coin-Clp/clp_make_install.sh ${COIN_CLP_LIBRARY_DIRS}/libClp.so)
ExternalProject_Add(
external_CoinUtils
PREFIX "external/CoinUtils"
GIT_REPOSITORY "https://github.com/coin-or/CoinUtils.git"
GIT_TAG "releases/2.11.4"
CONFIGURE_COMMAND "${COIN_UTILS_CONFIGURE_COMMAND}"
BUILD_COMMAND make -j ${BOOST_BUILD_N_PROCS}
INSTALL_COMMAND "${COIN_UTILS_MAKE_INSTALL_COMMAND}"
BINARY_DIR "${COIN_UTILS_BUILD_DIR}"
INSTALL_DIR "${COIN_UTILS_INSTALL_DIR}"
)
ExternalProject_Add(
external_Clp
PREFIX "external/coin-Clp"
URL ${COIN_CLP_URL}
GIT_REPOSITORY "https://github.com/coin-or/Clp.git"
GIT_TAG "releases/1.17.6"
CONFIGURE_COMMAND "${COIN_CLP_CONFIGURE_COMMAND}"
BUILD_COMMAND make -j ${BOOST_BUILD_N_PROCS}
INSTALL_COMMAND make install
INSTALL_COMMAND ${COIN_UTILS_MAKE_INSTALL_COMMAND}
BINARY_DIR "${COIN_CLP_BUILD_DIR}"
INSTALL_DIR "${COIN_CLP_INSTALL_DIR}"
)
add_dependencies(external_Clp external_CoinUtils)
set(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY_DIRS}/libClp.so;${COIN_CLP_LIBRARY_DIRS}/libCoinUtils.so")
include_directories(${COIN_CLP_INCLUDE_DIRS})
include_directories(${COIN_UTILS_INCLUDE_DIRS})
if(BUILD_TESTS)
find_package(GTest)
......
#! /usr/bin/bash
../src/external_CoinUtils/configure -C CXX=$3 --prefix=$1 --with-lapack-lflags="$2"
../src/external_CoinUtils/configure -C CXX=$3 --prefix=$1 --with-lapack-lflags="$2" --libdir=$4 ADD_CXXFLAGS="-std=c++14 -fPIC --shared"
#! /usr/bin/bash
if [ ! -f $1 ]; then make install; fi
#! /usr/bin/bash
../src/external_Clp/configure -C CXX=$3 --prefix=$1 --with-lapack-lib="$2" --with-blas-lib="$2" --libdir=$4 ADD_CXXFLAGS="-std=c++14 -fPIC --shared"
../src/external_Clp/configure -C CXX=$3 --prefix=$1 --with-lapack-lib="$2" --with-blas-lib="$2" --libdir=$4 --with-coinutils-lib="$5" --with-coinutils-incdir="$6" ADD_CXXFLAGS="-std=c++14 -fPIC --shared"
#! /usr/bin/bash
if [ ! -f $1 ]; then make install; fi
......@@ -16,6 +16,7 @@ RUN apt-get update &&\
apt-get install -y openmpi-bin openmpi-common libopenmpi-dev &&\
apt-get install -y doxygen &&\
apt-get install -y gcovr &&\
apt-get install -y pkgconf &&\
apt-get clean
RUN apt-get install -y gpg-agent wget software-properties-common &&\
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment