-diff -pruN openturns_ref/CMakeLists.txt openturns_dev/CMakeLists.txt
---- openturns_ref/CMakeLists.txt 2021-02-19 15:46:57.077060192 +0100
-+++ openturns_dev/CMakeLists.txt 2021-02-19 15:46:46.576956703 +0100
-@@ -125,6 +125,10 @@ set (OPENTURNS_TEMPDIR
+diff -Naur openturns_ref openturns_new
+diff -Naur openturns_ref/cmake/FindNLopt.cmake openturns_new/cmake/FindNLopt.cmake
+--- openturns_ref/cmake/FindNLopt.cmake 2020-11-09 14:06:44.000000000 +0100
++++ openturns_new/cmake/FindNLopt.cmake 2021-06-01 10:23:26.144409150 +0200
+@@ -11,10 +11,21 @@
+ # NLOPT_ROOT_DIR - root dir (ex. /usr/local)
+
+ # set NLOPT_INCLUDE_DIR
++SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR})
++
++IF(NLOPT_ROOT_DIR)
++ LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}")
++ LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/include")
++ LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/lib")
++ELSE(NLOPT_ROOT_DIR)
++ MESSAGE(FATAL_ERROR "PLEASE SET ENVIRONMENT VARIABLE NLOPT_ROOT_DIR")
++ENDIF(NLOPT_ROOT_DIR)
++
+ find_path (NLOPT_INCLUDE_DIR
+ NAMES nlopt.hpp
++ HINTS ${NLOPT_ROOT_DIR}/include
+ DOC
+- "Nlopt include directory"
++ "Nlopt include directory"
+ )
+
+ # set NLOPT_INCLUDE_DIRS
+@@ -22,9 +33,10 @@
+
+ # set NLOPT_LIBRARY
+ find_library (NLOPT_LIBRARY
+- NAMES nlopt_cxx nlopt
++ NAMES nlopt
++ HINTS ${NLOPT_ROOT_DIR}/lib
+ DOC
+- "Nlopt library location"
++ "Nlopt library location"
+ )
+
+ # set NLOPT_LIBRARIES
+diff -Naur openturns_ref/cmake/FindTBB.cmake openturns_new/cmake/FindTBB.cmake
+--- openturns_ref/cmake/FindTBB.cmake 2020-11-10 13:21:21.000000000 +0100
++++ openturns_new/cmake/FindTBB.cmake 2021-06-01 10:23:26.144409150 +0200
+@@ -27,6 +27,11 @@
+ # (To distributed this file outside of CMake, substitute the full
+ # License text for the above reference.)
+
++SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
++IF(TBB_ROOT_DIR)
++ LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}")
++ENDIF(TBB_ROOT_DIR)
++
+ find_path (TBB_INCLUDE_DIR NAMES tbb/tbb.h DOC "TBB include directory")
+
+ set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
+diff -Naur openturns_ref/CMakeLists.txt openturns_new/CMakeLists.txt
+--- openturns_ref/CMakeLists.txt 2020-11-18 16:33:36.000000000 +0100
++++ openturns_new/CMakeLists.txt 2021-06-01 10:26:34.647699757 +0200
+@@ -125,6 +125,10 @@
set (TEMPDIR ${OPENTURNS_TEMPDIR})
set (CMAKE_CXX_STANDARD 11)
if (NOT DEFINED LAPACK_LIBRARIES)
find_package (LAPACK REQUIRED)
-@@ -156,7 +160,11 @@ if (USE_FLEX)
+@@ -156,7 +160,11 @@
endif ()
endif ()
find_package (TBB)
endif ()
if (TBB_FOUND)
-@@ -200,6 +208,10 @@ if (USE_DOXYGEN)
+@@ -200,6 +208,10 @@
endif ()
if (USE_LIBXML2)
find_package (LibXml2)
endif ()
if (LIBXML2_FOUND)
-@@ -210,7 +222,7 @@ if (LIBXML2_FOUND)
+@@ -210,15 +222,25 @@
endif ()
if (USE_HDF5)
- find_package(HDF5 COMPONENTS CXX)
+-endif ()
++ SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to the HDF5.")
++ IF(HDF5_ROOT_DIR)
++ LIST(APPEND CMAKE_PREFIX_PATH "${HDF5_ROOT_DIR}")
++ ENDIF(HDF5_ROOT_DIR)
+ find_package(HDF5 COMPONENTS CXX HL)
- endif ()
++endif ()
++SET(MPI_ROOT_DIR $ENV{MPI_ROOT_DIR} CACHE PATH "Path to the MPI.")
++IF(MPI_ROOT_DIR)
++ LIST(APPEND CMAKE_PREFIX_PATH "${MPI_ROOT_DIR}")
++ find_package(MPI)
++ list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${MPI_INCLUDE_DIRS})
++ list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${MPI_LIBRARIES})
++ENDIF(MPI_ROOT_DIR)
if (HDF5_FOUND)
set (OPENTURNS_HAVE_HDF5 TRUE)
-@@ -218,7 +230,6 @@ if (HDF5_FOUND)
+ list (APPEND OPENTURNS_DEFINITIONS ${HDF5_DEFINITIONS})
list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS})
list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${HDF5_LIBRARIES})
endif ()
if (MSVC OR WINTEL)
set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/lib/include/pthread_win32 ${CMAKE_CURRENT_SOURCE_DIR}/lib/include)
include_directories (${PROJECT_SOURCE_DIR}/lib/include/pthread_win32 ${CMAKE_CURRENT_SOURCE_DIR}/lib/include)
-@@ -257,7 +268,7 @@ if (NOT R_EXECUTABLE)
+@@ -257,7 +279,7 @@
endif ()
if (USE_NLOPT)
if (NLopt_FOUND)
message(STATUS "Found NLopt: ${NLopt_DIR}")
else ()
-
-diff -pruN openturns_ref/cmake/FindTBB.cmake openturns_dev/cmake/FindTBB.cmake
---- openturns_ref/cmake/FindTBB.cmake 2021-02-19 15:46:57.058060005 +0100
-+++ openturns_dev/cmake/FindTBB.cmake 2021-02-19 15:51:59.654083375 +0100
-@@ -27,6 +27,11 @@
- # (To distributed this file outside of CMake, substitute the full
- # License text for the above reference.)
-
-+SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
-+IF(TBB_ROOT_DIR)
-+ LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}")
-+ENDIF(TBB_ROOT_DIR)
-+
- find_path (TBB_INCLUDE_DIR NAMES tbb/tbb.h DOC "TBB include directory")
-
- set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
-
-diff -pruN openturns_ref/cmake/FindNLopt.cmake openturns_dev/cmake/FindNLopt.cmake
---- openturns_ref/cmake/FindNLopt.cmake 2021-02-19 15:46:57.064060064 +0100
-+++ openturns_dev/cmake/FindNLopt.cmake 2021-02-19 15:53:27.134956381 +0100
-@@ -11,10 +11,21 @@
- # NLOPT_ROOT_DIR - root dir (ex. /usr/local)
-
- # set NLOPT_INCLUDE_DIR
-+SET(NLOPT_ROOT_DIR $ENV{NLOPT_ROOT_DIR})
-+
-+IF(NLOPT_ROOT_DIR)
-+ LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}")
-+ LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/include")
-+ LIST(APPEND CMAKE_PREFIX_PATH "${NLOPT_ROOT_DIR}/lib")
-+ELSE(NLOPT_ROOT_DIR)
-+ MESSAGE(FATAL_ERROR "PLEASE SET ENVIRONMENT VARIABLE NLOPT_ROOT_DIR")
-+ENDIF(NLOPT_ROOT_DIR)
-+
- find_path (NLOPT_INCLUDE_DIR
- NAMES nlopt.hpp
-+ HINTS ${NLOPT_ROOT_DIR}/include
- DOC
-- "Nlopt include directory"
-+ "Nlopt include directory"
- )
-
- # set NLOPT_INCLUDE_DIRS
-@@ -22,9 +33,10 @@ set (NLOPT_INCLUDE_DIRS ${NLOPT_INCLUDE_
-
- # set NLOPT_LIBRARY
- find_library (NLOPT_LIBRARY
-- NAMES nlopt_cxx nlopt
-+ NAMES nlopt
-+ HINTS ${NLOPT_ROOT_DIR}/lib
- DOC
-- "Nlopt library location"
-+ "Nlopt library location"
- )
-
- # set NLOPT_LIBRARIES
-
-diff -pruN openturns_ref/lib/src/CMakeLists.txt openturns_dev/lib/src/CMakeLists.txt
---- openturns_ref/lib/src/CMakeLists.txt 2021-02-19 15:46:49.880989268 +0100
-+++ openturns_dev/lib/src/CMakeLists.txt 2021-02-19 16:12:54.874714974 +0100
-@@ -80,15 +80,15 @@ if (BISON_FOUND AND FLEX_FOUND)
+diff -Naur openturns_ref/lib/src/Base/Common/openturns/TBB.hxx openturns_new/lib/src/Base/Common/openturns/TBB.hxx
+--- openturns_ref/lib/src/Base/Common/openturns/TBB.hxx 2020-11-10 13:21:21.000000000 +0100
++++ openturns_new/lib/src/Base/Common/openturns/TBB.hxx 2021-06-01 10:23:26.145409141 +0200
+@@ -35,6 +35,7 @@
+ # define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
+ # endif
+ #endif
++#define TBB_PREVIEW_TASK_ARENA 1
+ #include <tbb/task_arena.h>
+ #include <tbb/parallel_sort.h>
+ #include <tbb/parallel_reduce.h>
+diff -Naur openturns_ref/lib/src/CMakeLists.txt openturns_new/lib/src/CMakeLists.txt
+--- openturns_ref/lib/src/CMakeLists.txt 2020-11-10 13:21:21.000000000 +0100
++++ openturns_new/lib/src/CMakeLists.txt 2021-06-01 10:23:26.144409150 +0200
+@@ -80,15 +80,15 @@
add_dependencies (OT generate_csv_parser)
endif ()
set_target_properties (linktest PROPERTIES
INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${CMAKE_BINARY_DIR}/lib/src")
-@@ -109,5 +109,5 @@ install (TARGETS OT
+@@ -109,5 +109,5 @@
if (UNIX AND BUILD_SHARED_LIBS)
set (OT_GDB_PY ${CMAKE_SHARED_LIBRARY_PREFIX}OT${CMAKE_SHARED_LIBRARY_SUFFIX}.${LIB_VERSION}-gdb.py)
execute_process (COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/libOT-gdb.py ${CMAKE_CURRENT_BINARY_DIR}/${OT_GDB_PY})
- install (FILES libOT-gdb.py DESTINATION ${OPENTURNS_DATA_PATH}/gdb/auto-load/${LIBRARY_PATH} RENAME ${OT_GDB_PY})
+ install (FILES libOT-gdb.py DESTINATION ${OPENTURNS_DATA_PATH}/gdb/auto-load RENAME ${OT_GDB_PY})
endif ()
-
-diff -pruN openturns_ref/lib/src/Base/Common/openturns/TBB.hxx openturns_dev/lib/src/Base/Common/openturns/TBB.hxx
---- openturns_ref/lib/src/Base/Common/openturns/TBB.hxx 2021-02-19 15:46:48.419974868 +0100
-+++ openturns_dev/lib/src/Base/Common/openturns/TBB.hxx 2021-02-19 15:46:37.804870246 +0100
-@@ -35,6 +35,7 @@
- # define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
- # endif
- #endif
-+#define TBB_PREVIEW_TASK_ARENA 1
- #include <tbb/task_arena.h>
- #include <tbb/parallel_sort.h>
- #include <tbb/parallel_reduce.h>