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 09:58:15.000000000 +0200
3 +++ openturns-1.19_dev/openturns-1.19/CMakeLists.txt 2022-10-04 15:08:38.545535375 +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 + SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
32 + LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}")
34 find_package (TBB CONFIG)
36 message (STATUS "Found TBB: ${TBB_DIR} (found version ${TBB_VERSION})")
37 - set (TBB_LIBRARIES TBB::tbb)
38 + set (TBB_LIBRARIES tbb)
40 # fallback to our macro
46 + SET(LIBXML2_ROOT_DIR $ENV{LIBXLM2_ROOT_DIR})
47 + if(LIBXML2_ROOT_DIR)
48 + LIST(APPEND CMAKE_PREFIX_PATH "${LIBXML2_ROOT_DIR}")
49 + endif(LIBXML2_ROOT_DIR)
50 find_package (LibXml2)
54 list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${LIBXML2_LIBRARIES})
57 +SET(MPI_ROOT_DIR $ENV{MPI_ROOT_DIR} CACHE PATH "Path to the MPI.")
59 + LIST(APPEND CMAKE_PREFIX_PATH "${MPI_ROOT_DIR}")
61 + list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${MPI_INCLUDE_DIRS})
62 + list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${MPI_LIBRARIES})
66 + SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to the HDF5.")
68 + LIST(APPEND CMAKE_PREFIX_PATH "${HDF5_ROOT_DIR}")
69 + ENDIF(HDF5_ROOT_DIR)
70 find_package(HDF5 COMPONENTS C CXX)
77 + SET(BOOST_ROOT_DIR $ENV{BOOST_ROOT_DIR} CACHE PATH "Path to the BOOST.")
79 + LIST(APPEND CMAKE_PREFIX_PATH "${BOOST_ROOT_DIR}")
80 + ENDIF(BOOST_ROOT_DIR)
81 find_package (Boost 1.46)
83 if (CMAKE_VERSION VERSION_LESS 3.15)
88 - find_package (NLopt CONFIG QUIET)
89 + SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR} CACHE PATH "Path to the NLOPT.")
91 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}")
92 + ENDIF(NLOPT_ROOT_DIR)
93 + find_package (NLopt)
95 message(STATUS "Found NLopt: ${NLopt_DIR} (found version \"${NLopt_VERSION}\")")
101 - find_package (CMinpack CONFIG QUIET)
102 - if (CMinpack_FOUND)
103 - if (TARGET cminpack::cminpack)
104 - message (STATUS "Found CMinpack: ${CMinpack_DIR}")
105 - set (CMINPACK_LIBRARIES cminpack::cminpack)
108 - # fallback to our macro if CMinpackConfig is not provided
109 - find_package (CMinpack)
110 - set (CMinpack_FOUND ${CMINPACK_FOUND})
112 - if (CMinpack_FOUND)
113 - set (OPENTURNS_HAVE_CMINPACK TRUE)
114 - list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${CMINPACK_INCLUDE_DIRS})
115 - list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${CMINPACK_LIBRARIES})
117 + SET(CMINPACK_ROOT_DIR $ENV{CMINPACK_ROOT_DIR} CACHE PATH "Path to the CMINPACK.")
118 + IF(CMINPACK_ROOT_DIR)
119 + LIST(APPEND CMAKE_PREFIX_PATH "${CMINPACK_ROOT_DIR}")
120 + ENDIF(CMINPACK_ROOT_DIR)
121 + find_package (CMinpack)
122 + set (CMinpack_FOUND ${CMINPACK_FOUND})
125 + MESSAGE(STATUS "Found CMkinpack ...")
126 + MESSAGE(STATUS " CMINPACK_LIBRARIES is set to: ${CMINPACK_LIBRARIES}")
127 + set (OPENTURNS_HAVE_CMINPACK TRUE)
128 + list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${CMINPACK_INCLUDE_DIRS})
129 + list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${CMINPACK_LIBRARIES})
131 + MESSAGE(STATUS "Could not find MinPack dependency")
132 + set (OPENTURNS_HAVE_CMINPACK FALSE)
136 diff -Naur openturns-1.19_ref/openturns-1.19/cmake/FindCMinpack.cmake openturns-1.19_new/openturns-1.19/cmake/FindCMinpack.cmake
137 --- openturns-1.19_ref/openturns-1.19/cmake/FindCMinpack.cmake 2022-09-19 20:42:54.983898861 +0200
138 +++ openturns-1.19_new/openturns-1.19/cmake/FindCMinpack.cmake 2022-09-19 20:53:05.646768854 +0200
140 # (To distributed this file outside of CMake, substitute the full
141 # License text for the above reference.)
143 +SET(CMINPACK_ROOT_DIR $ENV{CMINPACK_ROOT_DIR})
144 +if(CMINPACK_ROOT_DIR)
145 + LIST(APPEND CMAKE_PREFIX_PATH "${CMINPACK_ROOT_DIR}")
146 +endif(CMINPACK_ROOT_DIR)
147 find_path (CMINPACK_INCLUDE_DIR cminpack.h
148 PATH_SUFFIXES cminpack cminpack-1
151 find_library (CMINPACK_LIBRARY
152 NAMES cminpack cminpack_s
153 + HINTS ${CMINPACK_ROOT_DIR}/include
154 + DOC "CMINPACK include directory"
157 set (CMINPACK_LIBRARIES ${CMINPACK_LIBRARY})
158 diff -Naur openturns-1.19_ref/openturns-1.19/cmake/FindNLopt.cmake openturns-1.19_new/openturns-1.19/cmake/FindNLopt.cmake
159 --- openturns-1.19_ref/openturns-1.19/cmake/FindNLopt.cmake 2022-09-19 20:42:54.947898206 +0200
160 +++ openturns-1.19_new/openturns-1.19/cmake/FindNLopt.cmake 2022-09-19 20:58:34.988527189 +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)
174 find_path (NLOPT_INCLUDE_DIR
177 "Nlopt include directory"
178 + HINTS ${NLOPT_ROOT_DIR}/include
181 # set NLOPT_INCLUDE_DIRS
185 find_library (NLOPT_LIBRARY
186 - NAMES nlopt_cxx nlopt
188 + HINTS ${NLOPT_ROOT_DIR}/lib
190 "Nlopt library location"
192 diff -Naur openturns-1.19_ref/openturns-1.19/cmake/FindTBB.cmake openturns-1.19_new/openturns-1.19/cmake/FindTBB.cmake
193 --- openturns-1.19_ref/openturns-1.19/cmake/FindTBB.cmake 2022-09-19 20:42:54.943898134 +0200
194 +++ openturns-1.19_new/openturns-1.19/cmake/FindTBB.cmake 2022-09-19 20:59:43.185715121 +0200
196 # (To distributed this file outside of CMake, substitute the full
197 # License text for the above reference.)
199 +SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
201 + 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.19_ref/openturns-1.19/lib/src/CMakeLists.txt openturns-1.19_new/openturns-1.19/lib/src/CMakeLists.txt
207 --- openturns-1.19_ref/openturns-1.19/lib/src/CMakeLists.txt 2022-09-19 20:43:02.736039628 +0200
208 +++ openturns-1.19_new/openturns-1.19/lib/src/CMakeLists.txt 2022-09-19 21:14:17.908888927 +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.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
217 --- openturns-1.19_ref/openturns-1.19/lib/src/Base/Common/openturns/TBBImplementation.hxx 2022-09-19 20:43:07.228121152 +0200
218 +++ openturns-1.19_new/openturns-1.19/lib/src/Base/Common/openturns/TBBImplementation.hxx 2022-09-19 21:16:38.747275561 +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.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
228 --- openturns-1.19_ref/openturns-1.19/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2022-09-19 20:43:04.604073534 +0200
229 +++ openturns-1.19_new/openturns-1.19/lib/src//Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2022-09-19 21:22:20.888944236 +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