1 diff -Naur openturns-1.18_ref/openturns-1.18/CMakeLists.txt openturns-1.18_new/openturns-1.18/CMakeLists.txt
2 --- openturns-1.17_ref/openturns-1.18/CMakeLists.txt 2021-09-21 13:59:56.000000000 +0200
3 +++ openturns-1.17_new/openturns-1.18/CMakeLists.txt 2021-10-04 13:27:16.893096795 +0200
6 set (CMAKE_CXX_STANDARD 11)
8 +SET(LAPACK_ROOT_DIR $ENV{LAPACK_ROOT_DIR})
10 + LIST(APPEND CMAKE_PREFIX_PATH "${LAPACK_ROOT_DIR}")
11 +ENDIF(LAPACK_ROOT_DIR)
13 if (NOT DEFINED LAPACK_LIBRARIES)
14 find_package (LAPACK REQUIRED)
19 list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${LAPACK_LIBRARIES})
20 +IF (DEFINED CBLAS_LIBRARIES)
21 + MESSAGE(STATUS "CBLAS_LIBRARIES is defined... adding to the list of libraries ${CBLAS_LIBRARIES}")
22 + LIST (APPEND OPENTURNS_PRIVATE_LIBRARIES ${CBLAS_LIBRARIES})
26 find_package (Spectra)
32 + SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
34 + LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}")
39 set (OPENTURNS_HAVE_TBB_TBB_H TRUE)
44 + SET(LIBXML2_ROOT_DIR $ENV{LIBXLM2_ROOT_DIR})
45 + if(LIBXML2_ROOT_DIR)
46 + LIST(APPEND CMAKE_PREFIX_PATH "${LIBXML2_ROOT_DIR}")
47 + endif(LIBXML2_ROOT_DIR)
48 find_package (LibXml2)
52 list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${LIBXML2_LIBRARIES})
55 +SET(MPI_ROOT_DIR $ENV{MPI_ROOT_DIR} CACHE PATH "Path to the MPI.")
57 + LIST(APPEND CMAKE_PREFIX_PATH "${MPI_ROOT_DIR}")
59 + list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${MPI_INCLUDE_DIRS})
60 + list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${MPI_LIBRARIES})
64 + SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to the HDF5.")
66 + LIST(APPEND CMAKE_PREFIX_PATH "${HDF5_ROOT_DIR}")
67 + ENDIF(HDF5_ROOT_DIR)
68 find_package(HDF5 COMPONENTS CXX)
75 + SET(BOOST_ROOT_DIR $ENV{BOOST_ROOT_DIR} CACHE PATH "Path to the BOOST.")
77 + LIST(APPEND CMAKE_PREFIX_PATH "${BOOST_ROOT_DIR}")
78 + ENDIF(BOOST_ROOT_DIR)
79 find_package (Boost 1.46)
81 if (CMAKE_VERSION VERSION_LESS 3.15)
86 - find_package (NLopt CONFIG QUIET)
87 + SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR} CACHE PATH "Path to the NLOPT.")
89 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}")
90 + ENDIF(NLOPT_ROOT_DIR)
91 + find_package (NLopt)
93 message(STATUS "Found NLopt: ${NLopt_DIR}")
99 - find_package (CMinpack CONFIG QUIET)
100 - if (CMinpack_FOUND)
101 - if (TARGET cminpack::cminpack)
102 - message (STATUS "Found CMinpack: ${CMinpack_DIR}")
103 - set (CMINPACK_LIBRARIES cminpack::cminpack)
106 - # fallback to our macro if CMinpackConfig is not provided
107 - find_package (CMinpack)
108 - set (CMinpack_FOUND ${CMINPACK_FOUND})
110 - if (CMinpack_FOUND)
111 - set (OPENTURNS_HAVE_CMINPACK TRUE)
112 - list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${CMINPACK_INCLUDE_DIRS})
113 - list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${CMINPACK_LIBRARIES})
115 + SET(CMINPACK_ROOT_DIR $ENV{CMINPACK_ROOT_DIR} CACHE PATH "Path to the CMINPACK.")
116 + IF(CMINPACK_ROOT_DIR)
117 + LIST(APPEND CMAKE_PREFIX_PATH "${CMINPACK_ROOT_DIR}")
118 + ENDIF(CMINPACK_ROOT_DIR)
119 + find_package (CMinpack)
120 + set (CMinpack_FOUND ${CMINPACK_FOUND})
123 + MESSAGE(STATUS "Found CMkinpack ...")
124 + MESSAGE(STATUS " CMINPACK_LIBRARIES is set to: ${CMINPACK_LIBRARIES}")
125 + set (OPENTURNS_HAVE_CMINPACK TRUE)
126 + list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${CMINPACK_INCLUDE_DIRS})
127 + list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${CMINPACK_LIBRARIES})
129 + MESSAGE(STATUS "Could not find MinPack dependency")
130 + set (OPENTURNS_HAVE_CMINPACK FALSE)
134 diff -Naur openturns-1.18_ref/openturns-1.18/cmake/FindCMinpack.cmake openturns-1.18_new/openturns-1.18/cmake/FindCMinpack.cmake
135 --- openturns-1.18_ref/openturns-1.18/cmake/FindCMinpack.cmake 2021-09-21 13:28:10.246960802 +0200
136 +++ openturns-1.18_new/openturns-1.18/cmake/FindCMinpack.cmake 2021-09-21 13:27:42.519698634 +0200
138 # (To distributed this file outside of CMake, substitute the full
139 # License text for the above reference.)
141 +SET(CMINPACK_ROOT_DIR $ENV{CMINPACK_ROOT_DIR})
142 +if(CMINPACK_ROOT_DIR)
143 + LIST(APPEND CMAKE_PREFIX_PATH "${CMINPACK_ROOT_DIR}")
144 +endif(CMINPACK_ROOT_DIR)
145 find_path (CMINPACK_INCLUDE_DIR cminpack.h
146 PATH_SUFFIXES cminpack cminpack-1
149 find_library (CMINPACK_LIBRARY
150 NAMES cminpack cminpack_s
151 + HINTS ${CMINPACK_ROOT_DIR}/include
152 + DOC "CMINPACK include directory"
155 set (CMINPACK_LIBRARIES ${CMINPACK_LIBRARY})
156 set (CMINPACK_INCLUDE_DIRS ${CMINPACK_INCLUDE_DIR})
158 diff -Naur openturns-1.18_ref/openturns-1.18/cmake/FindNLopt.cmake openturns-1.18_new/openturns-1.18/cmake/FindNLopt.cmake
159 --- openturns-1.18_ref/openturns-1.18/cmake/FindNLopt.cmake 2021-09-21 13:28:10.247960811 +0200
160 +++ openturns-1.18_new/openturns-1.18/cmake/FindNLopt.cmake 2021-09-21 13:27:42.520698643 +0200
162 # NLOPT_ROOT_DIR - root dir (ex. /usr/local)
164 # set NLOPT_INCLUDE_DIR
165 +SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR})
168 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}")
169 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/include")
170 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/lib")
171 +ELSE(NLOPT_ROOT_DIR)
172 + MESSAGE(FATAL_ERROR "PLEASE SET ENVIRONMENT VARIABLE NLOPT_ROOT_DIR")
173 +ENDIF(NLOPT_ROOT_DIR)
175 find_path (NLOPT_INCLUDE_DIR
177 + HINTS ${NLOPT_ROOT_DIR}/include
179 "Nlopt include directory"
184 find_library (NLOPT_LIBRARY
185 - NAMES nlopt_cxx nlopt
187 + HINTS ${NLOPT_ROOT_DIR}/lib
189 "Nlopt library location"
191 diff -Naur openturns-1.18_ref/openturns-1.18/cmake/FindTBB.cmake openturns-1.18_new/openturns-1.18/cmake/FindTBB.cmake
192 --- openturns-1.18_ref/openturns-1.18/cmake/FindTBB.cmake 2021-09-21 13:28:10.242960764 +0200
193 +++ openturns-1.18_new/openturns-1.18/cmake/FindTBB.cmake 2021-09-21 13:27:42.514698586 +0200
195 # (To distributed this file outside of CMake, substitute the full
196 # License text for the above reference.)
198 +SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
200 + LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}")
203 find_path (TBB_INCLUDE_DIR NAMES tbb/tbb.h DOC "TBB include directory")
205 set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
206 diff -Naur openturns-1.18_ref/openturns-1.18/lib/src/CMakeLists.txt openturns-1.18_new/openturns-1.18/lib/src/CMakeLists.txt
207 --- openturns-1.18_ref/openturns-1.18/lib/src/CMakeLists.txt 2021-09-21 13:27:57.412839452 +0200
208 +++ openturns-1.18_new/openturns-1.18/lib/src/CMakeLists.txt 2021-09-21 13:27:14.134430243 +0200
210 if (UNIX AND BUILD_SHARED_LIBS)
211 set (OT_GDB_PY ${CMAKE_SHARED_LIBRARY_PREFIX}OT${CMAKE_SHARED_LIBRARY_SUFFIX}.${LIB_VERSION}-gdb.py)
212 execute_process (COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/libOT-gdb.py ${CMAKE_CURRENT_BINARY_DIR}/${OT_GDB_PY})
213 - install (FILES libOT-gdb.py DESTINATION ${OPENTURNS_DATA_PATH}/gdb/auto-load/${LIBRARY_PATH} RENAME ${OT_GDB_PY})
214 + install (FILES libOT-gdb.py DESTINATION ${OPENTURNS_DATA_PATH}/gdb/auto-load RENAME ${OT_GDB_PY})
216 diff -Naur openturns-1.18_ref/openturns-1.18/lib/src/Base/Common/openturns/TBB.hxx openturns-1.18_new/openturns-1.18/lib/src/Base/Common/openturns/TBB.hxx
217 --- openturns-1.18_ref/openturns-1.18/lib/src/Base/Common/openturns/TBB.hxx 2021-09-21 13:27:54.484811767 +0200
218 +++ openturns-1.18_new/openturns-1.18/lib/src/Base/Common/openturns/TBB.hxx 2021-09-21 13:27:12.704416722 +0200
220 # define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
223 +#define TBB_PREVIEW_TASK_ARENA 1
224 #include <tbb/task_arena.h>
225 #include <tbb/parallel_sort.h>
226 #include <tbb/parallel_reduce.h>
227 diff -Naur openturns-1.18_ref/openturns-1.18/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx openturns-1.18_new/openturns-1.18/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx
228 --- openturns-1.18_ref/openturns-1.18/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2021-09-21 13:27:55.324819709 +0200
229 +++ openturns-1.18_new/openturns-1.18/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2021-09-21 13:27:13.048419975 +0200
231 #include "openturns/PersistentObject.hxx"
232 #include "openturns/CovarianceModel.hxx"
233 #include "openturns/KarhunenLoeveResult.hxx"
235 +# include <features.h>
236 +# if __GNUC_PREREQ(11,0)
242 BEGIN_NAMESPACE_OPENTURNS