1 diff -Naur openturns_ref openturns_new
2 diff -Naur openturns_ref/cmake/FindNLopt.cmake openturns_new/cmake/FindNLopt.cmake
3 --- openturns_ref/cmake/FindNLopt.cmake 2020-11-09 14:06:44.000000000 +0100
4 +++ openturns_new/cmake/FindNLopt.cmake 2021-06-01 10:23:26.144409150 +0200
6 # NLOPT_ROOT_DIR - root dir (ex. /usr/local)
8 # set NLOPT_INCLUDE_DIR
9 +SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR})
12 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}")
13 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/include")
14 + LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/lib")
16 + MESSAGE(FATAL_ERROR "PLEASE SET ENVIRONMENT VARIABLE NLOPT_ROOT_DIR")
17 +ENDIF(NLOPT_ROOT_DIR)
19 find_path (NLOPT_INCLUDE_DIR
21 + HINTS ${NLOPT_ROOT_DIR}/include
23 - "Nlopt include directory"
24 + "Nlopt include directory"
27 # set NLOPT_INCLUDE_DIRS
31 find_library (NLOPT_LIBRARY
32 - NAMES nlopt_cxx nlopt
34 + HINTS ${NLOPT_ROOT_DIR}/lib
36 - "Nlopt library location"
37 + "Nlopt library location"
41 diff -Naur openturns_ref/cmake/FindTBB.cmake openturns_new/cmake/FindTBB.cmake
42 --- openturns_ref/cmake/FindTBB.cmake 2020-11-10 13:21:21.000000000 +0100
43 +++ openturns_new/cmake/FindTBB.cmake 2021-06-01 10:23:26.144409150 +0200
45 # (To distributed this file outside of CMake, substitute the full
46 # License text for the above reference.)
48 +SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
50 + LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}")
53 find_path (TBB_INCLUDE_DIR NAMES tbb/tbb.h DOC "TBB include directory")
55 set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
56 diff -Naur openturns_ref/CMakeLists.txt openturns_new/CMakeLists.txt
57 --- openturns_ref/CMakeLists.txt 2020-11-18 16:33:36.000000000 +0100
58 +++ openturns_new/CMakeLists.txt 2021-06-01 10:26:34.647699757 +0200
60 set (TEMPDIR ${OPENTURNS_TEMPDIR})
62 set (CMAKE_CXX_STANDARD 11)
63 +SET(LAPACK_ROOT_DIR $ENV{LAPACK_ROOT_DIR})
65 + LIST(APPEND CMAKE_PREFIX_PATH "${LAPACK_ROOT_DIR}")
66 +ENDIF(LAPACK_ROOT_DIR)
68 if (NOT DEFINED LAPACK_LIBRARIES)
69 find_package (LAPACK REQUIRED)
76 + SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
78 + LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}")
87 + SET(LIBXML2_ROOT_DIR $ENV{LIBXLM2_ROOT_DIR})
88 + if(LIBXML2_ROOT_DIR)
89 + LIST(APPEND CMAKE_PREFIX_PATH "${LIBXML2_ROOT_DIR}")
90 + endif(LIBXML2_ROOT_DIR)
91 find_package (LibXml2)
98 - find_package(HDF5 COMPONENTS CXX)
100 + SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to the HDF5.")
102 + LIST(APPEND CMAKE_PREFIX_PATH "${HDF5_ROOT_DIR}")
103 + ENDIF(HDF5_ROOT_DIR)
104 + find_package(HDF5 COMPONENTS CXX HL)
106 +SET(MPI_ROOT_DIR $ENV{MPI_ROOT_DIR} CACHE PATH "Path to the MPI.")
108 + LIST(APPEND CMAKE_PREFIX_PATH "${MPI_ROOT_DIR}")
110 + list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${MPI_INCLUDE_DIRS})
111 + list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${MPI_LIBRARIES})
114 set (OPENTURNS_HAVE_HDF5 TRUE)
115 list (APPEND OPENTURNS_DEFINITIONS ${HDF5_DEFINITIONS})
116 list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS})
117 list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${HDF5_LIBRARIES})
121 set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/lib/include/pthread_win32 ${CMAKE_CURRENT_SOURCE_DIR}/lib/include)
122 include_directories (${PROJECT_SOURCE_DIR}/lib/include/pthread_win32 ${CMAKE_CURRENT_SOURCE_DIR}/lib/include)
127 - find_package (NLopt CONFIG QUIET)
128 +# find_package (NLopt CONFIG QUIET)
130 message(STATUS "Found NLopt: ${NLopt_DIR}")
132 diff -Naur openturns_ref/lib/src/Base/Common/openturns/TBB.hxx openturns_new/lib/src/Base/Common/openturns/TBB.hxx
133 --- openturns_ref/lib/src/Base/Common/openturns/TBB.hxx 2020-11-10 13:21:21.000000000 +0100
134 +++ openturns_new/lib/src/Base/Common/openturns/TBB.hxx 2021-06-01 10:23:26.145409141 +0200
136 # define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
139 +#define TBB_PREVIEW_TASK_ARENA 1
140 #include <tbb/task_arena.h>
141 #include <tbb/parallel_sort.h>
142 #include <tbb/parallel_reduce.h>
143 diff -Naur openturns_ref/lib/src/CMakeLists.txt openturns_new/lib/src/CMakeLists.txt
144 --- openturns_ref/lib/src/CMakeLists.txt 2020-11-10 13:21:21.000000000 +0100
145 +++ openturns_new/lib/src/CMakeLists.txt 2021-06-01 10:23:26.144409150 +0200
147 add_dependencies (OT generate_csv_parser)
150 -target_link_libraries (OT PUBLIC ${OPENTURNS_LIBRARIES})
151 -target_link_libraries (OT PRIVATE ${OPENTURNS_PRIVATE_LIBRARIES})
152 +target_link_libraries (OT PUBLIC ${OPENTURNS_LIBRARIES} ${HDF5_LIBRARIES} ${TBB_LIBRARIES})
153 +target_link_libraries (OT PRIVATE ${OPENTURNS_PRIVATE_LIBRARIES} ${HDF5_LIBRARIES} ${TBB_LIBRARIES})
155 target_include_directories (OT INTERFACE $<INSTALL_INTERFACE:include>)
156 target_include_directories (OT PUBLIC ${OPENTURNS_INCLUDE_DIRS})
158 # Build an empty executable to check link dependencies and completeness
159 add_executable (linktest main.cxx)
160 -target_link_libraries (linktest OT)
161 +target_link_libraries (linktest OT ${TBB_LIBRARIES} ${HDF5_LIBRARIES})
162 set_target_properties (linktest PROPERTIES
163 INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${CMAKE_BINARY_DIR}/lib/src")
166 if (UNIX AND BUILD_SHARED_LIBS)
167 set (OT_GDB_PY ${CMAKE_SHARED_LIBRARY_PREFIX}OT${CMAKE_SHARED_LIBRARY_SUFFIX}.${LIB_VERSION}-gdb.py)
168 execute_process (COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/libOT-gdb.py ${CMAKE_CURRENT_BINARY_DIR}/${OT_GDB_PY})
169 - install (FILES libOT-gdb.py DESTINATION ${OPENTURNS_DATA_PATH}/gdb/auto-load/${LIBRARY_PATH} RENAME ${OT_GDB_PY})
170 + install (FILES libOT-gdb.py DESTINATION ${OPENTURNS_DATA_PATH}/gdb/auto-load RENAME ${OT_GDB_PY})