]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
update patch
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Fri, 15 Oct 2021 14:47:34 +0000 (16:47 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Fri, 15 Oct 2021 14:47:34 +0000 (16:47 +0200)
products/compil_scripts/openturns-1.17.sh
products/patches/openturns-1.17.0001.patch

index d1bd895014811d822f04c7b13e465a43a4bd1119..caec155fdb46d10cf0f58852b41516469d31a6f9 100755 (executable)
@@ -24,22 +24,19 @@ CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release"
 CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=${PYTHONBIN}"
 CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig"
 
-if [ "${TBB_ROOT_DIR}" != "/usr" ]
-then
+if [ -n "$TBB_ROOT_DIR" ] && [ "${TBB_ROOT_DIR}" != "/usr" ]; then
     CMAKE_OPTIONS+=" -DTBB_ROOT_DIR=${TBB_ROOT_DIR}"
 fi
 
 ### libxml2 settings
-if [ "${LIBXML2_ROOT_DIR}" != "/usr" ]
-then
+if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then
     CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2"
     CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so"
     CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint"
 fi
 
 # HDF5
-if [ "${HDF5_ROOT_DIR}" != "/usr" ]
-then
+if [ -n "$HDF5_ROOT_DIR" ] && [ "${HDF5_ROOT_DIR}" != "/usr" ]; then
     CMAKE_OPTIONS+=" -DHDF5_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5"
     CMAKE_OPTIONS+=" -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF"
     CMAKE_OPTIONS+=" -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}"
@@ -50,8 +47,7 @@ then
 fi
 
 # CMINPACK
-if [ "${CMINPACK_ROOT_DIR}" != "/usr" ]
-then
+if [ "${CMINPACK_ROOT_DIR}" != "/usr" ]; then
     CMAKE_OPTIONS+=" -DCMINPACK_ROOT_DIR=${CMINPACK_ROOT_DIR}"
     CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1"
     CMAKE_OPTIONS+=" -DCMINPACK_LIBRARY=$CMINPACK_ROOT_DIR/lib/libcminpack_s.a"
@@ -67,15 +63,17 @@ then
     CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=$LAPACK_ROOT_DIR/lib/libcblas.so"
 fi
 ### libxml2 settings
-if [ -n "$LIBXML2_ROOT_DIR" ]
-then
-    # with a native libxml2, do not use these options
-    if [ "${LIBXML2_ROOT_DIR}" != "/usr" ]
-    then
-        CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2"
-        CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so"
-        CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint"
-    fi
+if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then
+    CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2"
+    CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so"
+    CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint"
+fi
+
+## nlopt
+if [ -n "$NLOPT_ROOT_DIR" ] && [ "${NLOPT_ROOT_DIR}" != "/usr" ]; then
+    CMAKE_OPTIONS+=" -DNLOPT_INCLUDE_DIRS:STRING=${NLOPT_ROOT_DIR}/include"
+    CMAKE_OPTIONS+=" -DNLOPT_LIBRARIES:STRING=${NLOPT_ROOT_DIR}/lib"
+    CMAKE_OPTIONS+=" -DNLOPT_DIR:STRING=${NLOPT_ROOT_DIR}"
 fi
 
 echo
index 7a5e14fd7a8ca715161aee02104bd22ec08c22fb..1e98e9b9de6ed37a2a5decc89ab3a9e0f3283e5b 100644 (file)
@@ -1,6 +1,6 @@
 diff -Naur openturns-1.17_ref/openturns-1.17/CMakeLists.txt openturns-1.17_new/openturns-1.17/CMakeLists.txt
---- openturns-1.17_ref/openturns-1.17/CMakeLists.txt   2021-09-21 13:28:10.257960906 +0200
-+++ openturns-1.17_new/openturns-1.17/CMakeLists.txt   2021-09-21 13:37:49.975423413 +0200
+--- openturns-1.17_ref/openturns-1.17/CMakeLists.txt   2021-09-21 13:59:56.000000000 +0200
++++ openturns-1.17_new/openturns-1.17/CMakeLists.txt   2021-10-04 13:27:16.893096795 +0200
 @@ -133,6 +133,11 @@
  
  set (CMAKE_CXX_STANDARD 11)
@@ -79,17 +79,19 @@ diff -Naur openturns-1.17_ref/openturns-1.17/CMakeLists.txt openturns-1.17_new/o
    find_package (Boost 1.46)
    if (Boost_FOUND)
      if (CMAKE_VERSION VERSION_LESS 3.15)
-@@ -272,6 +305,10 @@
+@@ -272,7 +305,11 @@
  endif ()
  
  if (USE_NLOPT)
+-  find_package (NLopt CONFIG QUIET)
 +  SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR} CACHE PATH "Path to the NLOPT.")
 +  IF(NLOPT_ROOT_DIR)
 +    LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}")
 +  ENDIF(NLOPT_ROOT_DIR)
-   find_package (NLopt CONFIG QUIET)
++  find_package (NLopt)
    if (NLopt_FOUND)
      message(STATUS "Found NLopt: ${NLopt_DIR}")
+   else ()
 @@ -336,22 +373,22 @@
  endif ()