1 diff -Naur openturns-1.19_ref/openturns-1.19/CMakeLists.txt openturns-1.19_new/openturns-1.19/CMakeLists.txt
2 --- openturns-1.19_ref/openturns-1.19/CMakeLists.txt 2022-09-19 20:42:54.651892829 +0200
3 +++ openturns-1.19_new/openturns-1.19/CMakeLists.txt 2022-09-19 20:50:32.780078679 +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)
12 if (NOT DEFINED LAPACK_LIBRARIES)
13 find_package (LAPACK REQUIRED)
17 list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${LAPACK_LIBRARIES})
19 +IF (DEFINED CBLAS_LIBRARIES)
20 + MESSAGE(STATUS "CBLAS_LIBRARIES is defined... adding to the list of libraries ${CBLAS_LIBRARIES}")
21 + LIST (APPEND OPENTURNS_PRIVATE_LIBRARIES ${CBLAS_LIBRARIES})
24 find_package (Spectra 1.0 CONFIG)
30 - find_package (TBB CONFIG)
31 + SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
33 + LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}")
35 + find_package (TBB CONFIG)
37 message (STATUS "Found TBB: ${TBB_DIR} (found version ${TBB_VERSION})")
38 set (TBB_LIBRARIES TBB::tbb)
43 + SET(LIBXML2_ROOT_DIR $ENV{LIBXLM2_ROOT_DIR})
44 + if(LIBXML2_ROOT_DIR)
45 + LIST(APPEND CMAKE_PREFIX_PATH "${LIBXML2_ROOT_DIR}")
46 + endif(LIBXML2_ROOT_DIR)
47 find_package (LibXml2)
51 list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${LIBXML2_LIBRARIES})
54 +SET(MPI_ROOT_DIR $ENV{MPI_ROOT_DIR} CACHE PATH "Path to the MPI.")
56 + LIST(APPEND CMAKE_PREFIX_PATH "${MPI_ROOT_DIR}")
58 + list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${MPI_INCLUDE_DIRS})
59 + list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${MPI_LIBRARIES})
63 + SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to the HDF5.")
65 + LIST(APPEND CMAKE_PREFIX_PATH "${HDF5_ROOT_DIR}")
66 + ENDIF(HDF5_ROOT_DIR)
67 find_package(HDF5 COMPONENTS C CXX)
74 + SET(BOOST_ROOT_DIR $ENV{BOOST_ROOT_DIR} CACHE PATH "Path to the BOOST.")
76 + LIST(APPEND CMAKE_PREFIX_PATH "${BOOST_ROOT_DIR}")
77 + ENDIF(BOOST_ROOT_DIR)
78 find_package (Boost 1.46)
80 if (CMAKE_VERSION VERSION_LESS 3.15)
85 - find_package (NLopt CONFIG QUIET)
86 + SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR} CACHE PATH "Path to the NLOPT.")
88 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}")
89 + ENDIF(NLOPT_ROOT_DIR)
90 + find_package (NLopt)
92 message(STATUS "Found NLopt: ${NLopt_DIR} (found version \"${NLopt_VERSION}\")")
98 - find_package (CMinpack CONFIG QUIET)
100 - if (TARGET cminpack::cminpack)
101 - message (STATUS "Found CMinpack: ${CMinpack_DIR}")
102 - set (CMINPACK_LIBRARIES cminpack::cminpack)
105 - # fallback to our macro if CMinpackConfig is not provided
106 - find_package (CMinpack)
107 - set (CMinpack_FOUND ${CMINPACK_FOUND})
109 - if (CMinpack_FOUND)
110 - set (OPENTURNS_HAVE_CMINPACK TRUE)
111 - list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${CMINPACK_INCLUDE_DIRS})
112 - list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${CMINPACK_LIBRARIES})
114 + SET(CMINPACK_ROOT_DIR $ENV{CMINPACK_ROOT_DIR} CACHE PATH "Path to the CMINPACK.")
115 + IF(CMINPACK_ROOT_DIR)
116 + LIST(APPEND CMAKE_PREFIX_PATH "${CMINPACK_ROOT_DIR}")
117 + ENDIF(CMINPACK_ROOT_DIR)
118 + find_package (CMinpack)
119 + set (CMinpack_FOUND ${CMINPACK_FOUND})
122 + MESSAGE(STATUS "Found CMkinpack ...")
123 + MESSAGE(STATUS " CMINPACK_LIBRARIES is set to: ${CMINPACK_LIBRARIES}")
124 + set (OPENTURNS_HAVE_CMINPACK TRUE)
125 + list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${CMINPACK_INCLUDE_DIRS})
126 + list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${CMINPACK_LIBRARIES})
128 + MESSAGE(STATUS "Could not find MinPack dependency")
129 + set (OPENTURNS_HAVE_CMINPACK FALSE)
133 diff -Naur openturns-1.19_ref/openturns-1.19/cmake/FindCMinpack.cmake openturns-1.19_new/openturns-1.19/cmake/FindCMinpack.cmake
134 --- openturns-1.19_ref/openturns-1.19/cmake/FindCMinpack.cmake 2022-09-19 20:42:54.983898861 +0200
135 +++ openturns-1.19_new/openturns-1.19/cmake/FindCMinpack.cmake 2022-09-19 20:53:05.646768854 +0200
137 # (To distributed this file outside of CMake, substitute the full
138 # License text for the above reference.)
140 +SET(CMINPACK_ROOT_DIR $ENV{CMINPACK_ROOT_DIR})
141 +if(CMINPACK_ROOT_DIR)
142 + LIST(APPEND CMAKE_PREFIX_PATH "${CMINPACK_ROOT_DIR}")
143 +endif(CMINPACK_ROOT_DIR)
144 find_path (CMINPACK_INCLUDE_DIR cminpack.h
145 PATH_SUFFIXES cminpack cminpack-1
148 find_library (CMINPACK_LIBRARY
149 NAMES cminpack cminpack_s
150 + HINTS ${CMINPACK_ROOT_DIR}/include
151 + DOC "CMINPACK include directory"
154 set (CMINPACK_LIBRARIES ${CMINPACK_LIBRARY})
155 diff -Naur openturns-1.19_ref/openturns-1.19/cmake/FindNLopt.cmake openturns-1.19_new/openturns-1.19/cmake/FindNLopt.cmake
156 --- openturns-1.19_ref/openturns-1.19/cmake/FindNLopt.cmake 2022-09-19 20:42:54.947898206 +0200
157 +++ openturns-1.19_new/openturns-1.19/cmake/FindNLopt.cmake 2022-09-19 20:58:34.988527189 +0200
159 # NLOPT_ROOT_DIR - root dir (ex. /usr/local)
161 # set NLOPT_INCLUDE_DIR
162 +SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR})
165 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}")
166 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/include")
167 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/lib")
168 +ELSE(NLOPT_ROOT_DIR)
169 + MESSAGE(FATAL_ERROR "PLEASE SET ENVIRONMENT VARIABLE NLOPT_ROOT_DIR")
170 +ENDIF(NLOPT_ROOT_DIR)
171 find_path (NLOPT_INCLUDE_DIR
174 "Nlopt include directory"
175 + HINTS ${NLOPT_ROOT_DIR}/include
178 # set NLOPT_INCLUDE_DIRS
182 find_library (NLOPT_LIBRARY
183 - NAMES nlopt_cxx nlopt
185 + HINTS ${NLOPT_ROOT_DIR}/lib
187 "Nlopt library location"
189 diff -Naur openturns-1.19_ref/openturns-1.19/cmake/FindTBB.cmake openturns-1.19_new/openturns-1.19/cmake/FindTBB.cmake
190 --- openturns-1.19_ref/openturns-1.19/cmake/FindTBB.cmake 2022-09-19 20:42:54.943898134 +0200
191 +++ openturns-1.19_new/openturns-1.19/cmake/FindTBB.cmake 2022-09-19 20:59:43.185715121 +0200
193 # (To distributed this file outside of CMake, substitute the full
194 # License text for the above reference.)
196 +SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
198 + LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}")
200 find_path (TBB_INCLUDE_DIR NAMES tbb/tbb.h DOC "TBB include directory")
202 set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
203 diff -Naur openturns-1.19_ref/openturns-1.19/lib/src/CMakeLists.txt openturns-1.19_new/openturns-1.19/lib/src/CMakeLists.txt
204 --- openturns-1.19_ref/openturns-1.19/lib/src/CMakeLists.txt 2022-09-19 20:43:02.736039628 +0200
205 +++ openturns-1.19_new/openturns-1.19/lib/src/CMakeLists.txt 2022-09-19 21:14:17.908888927 +0200
207 if (UNIX AND BUILD_SHARED_LIBS)
208 set (OT_GDB_PY ${CMAKE_SHARED_LIBRARY_PREFIX}OT${CMAKE_SHARED_LIBRARY_SUFFIX}.${LIB_VERSION}-gdb.py)
209 execute_process (COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/libOT-gdb.py ${CMAKE_CURRENT_BINARY_DIR}/${OT_GDB_PY})
210 - install (FILES libOT-gdb.py DESTINATION ${OPENTURNS_DATA_PATH}/gdb/auto-load/${LIBRARY_PATH} RENAME ${OT_GDB_PY})
211 + install (FILES libOT-gdb.py DESTINATION ${OPENTURNS_DATA_PATH}/gdb/auto-load RENAME ${OT_GDB_PY})
213 diff -Naur openturns-1.19_ref/openturns-1.19/lib/src/Base/Common/openturns/TBBImplementation.hxx openturns-1.19_new/openturns-1.19/lib/src/Base/Common/openturns/TBBImplementation.hxx
214 --- openturns-1.19_ref/openturns-1.19/lib/src/Base/Common/openturns/TBBImplementation.hxx 2022-09-19 20:43:07.228121152 +0200
215 +++ openturns-1.19_new/openturns-1.19/lib/src/Base/Common/openturns/TBBImplementation.hxx 2022-09-19 21:16:38.747275561 +0200
217 # define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
220 +#define TBB_PREVIEW_TASK_ARENA 1
221 #include <tbb/task_arena.h>
222 #include <tbb/parallel_sort.h>
223 #include <tbb/parallel_reduce.h>
224 diff -Naur openturns-1.19_ref/openturns-1.19/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx openturns-1.19_new/openturns-1.19/lib/src//Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx
225 --- openturns-1.19_ref/openturns-1.19/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2022-09-19 20:43:04.604073534 +0200
226 +++ openturns-1.19_new/openturns-1.19/lib/src//Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2022-09-19 21:22:20.888944236 +0200
228 #include "openturns/PersistentObject.hxx"
229 #include "openturns/CovarianceModel.hxx"
230 #include "openturns/KarhunenLoeveResult.hxx"
232 +# include <features.h>
233 +# if __GNUC_PREREQ(11,0)
239 BEGIN_NAMESPACE_OPENTURNS