From: Nabil Ghodbane Date: Thu, 15 Sep 2022 14:25:42 +0000 (+0200) Subject: FD36: use nlopt 2.6.0 compilation script X-Git-Tag: V9_11_0~321 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d62fcf756657d4bb7e924e46c03d5da5aacd1289;p=tools%2Fsat_salome.git FD36: use nlopt 2.6.0 compilation script --- diff --git a/products/compil_scripts/nlopt-2.6.0.sh b/products/compil_scripts/nlopt-2.6.0.sh new file mode 100755 index 0000000..856bbd1 --- /dev/null +++ b/products/compil_scripts/nlopt-2.6.0.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +echo "##########################################################################" +echo "nlopt" $VERSION +echo "##########################################################################" + +CMAKE_OPTIONS="" + +### common compiler and install settings +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" +CMAKE_OPTIONS+=" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" +if [ -n "$SAT_DEBUG" ]; then + CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Debug" +else + CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release" +fi + +if [ -n "$SWIG_ROOT_DIR" ] && [ "$SAT_swig_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" +fi +CMAKE_OPTIONS+=" -DBUILD_SHARED_LIBS:BOOL=ON" +CMAKE_OPTIONS+=" -DNLOPT_MATLAB:BOOL=OFF" +CMAKE_OPTIONS+=" -DNLOPT_OCTAVE:BOOL=OFF" +CMAKE_OPTIONS+=" -DNLOPT_GUILE:BOOL=OFF" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib" + +echo +echo "*** cmake" $CMAKE_OPTIONS + +rm -rf $BUILD_DIR +mkdir -p $BUILD_DIR +cd $BUILD_DIR + +cmake $CMAKE_OPTIONS $SOURCE_DIR +if [ $? -ne 0 ] +then + echo "ERROR on cmake" + exit 1 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 3 +fi + +echo +echo "########## END" +