'openblas',
'pthreads'
]
- patches : []
+ patches : ['PERSALYS-v14.1-002.patch', 'PERSALYS-v14.1-003.patch']
}
version_v14_0_1 :
set CMAKE_OPTIONS_EXT=%CMAKE_OPTIONS%
cd %BUILD_DIR%\otpod
-xcopy %SOURCE_DIR%\otpod-0.6.9\* %BUILD_DIR%\otpod /E /I /Q
+xcopy %SOURCE_DIR%\otpod-0.6.10\* %BUILD_DIR%\otpod /E /I /Q
if NOT %ERRORLEVEL% == 0 (
echo ERROR on xcopy
exit 3
build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name
depend : ['Python', 'openblas', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'fftw']
opt_depend : ['pandas', 'statsmodels', 'patsy']
- patches : []
+ patches : ['openturns-1.21.0003.patch', 'openturns-1.21.0004.patch']
properties :
{
single_install_dir : "no"
--- /dev/null
+--- persalys-14.1_ref/CMakeLists.txt 2023-07-25 11:23:39.000000000 +0200
++++ persalys-14.1_dev/CMakeLists.txt 2023-09-26 12:57:40.000000000 +0200
+@@ -64,9 +64,16 @@
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
+ endif ()
+
++SET(BOOST_ROOT_DIR $ENV{BOOST_ROOT_DIR} CACHE PATH "Path to the Boost")
++if(EXISTS "${BOOST_ROOT_DIR}")
++ set(BOOST_ROOT "${BOOST_ROOT_DIR}" CACHE PATH "Boost root directory" FORCE)
++endif()
++set(Boost_USE_DEBUG_LIBS OFF) # ignore debug libs and
++set(Boost_USE_RELEASE_LIBS ON) # only find release libsfind_package (Boost COMPONENTS filesystem locale REQUIRED)
+ find_package (Boost COMPONENTS filesystem locale REQUIRED)
+-list (APPEND PERSALYS_PRIVATE_LIBRARIES ${Boost_LIBRARIES})
+-
++if (TARGET Boost::filesystem)
++ set (Boost_LIBRARIES Boost::filesystem Boost::locale)
++ENDIF()
+ find_package (Python 3.5 COMPONENTS Interpreter Development REQUIRED)
+ list (APPEND PERSALYS_PUBLIC_LIBRARIES ${Python_LIBRARIES})
+
--- /dev/null
+--- persalys-14.1_ref/lib/src/base/CMakeLists.txt 2023-07-25 11:23:39.000000000 +0200
++++ persalys-14.1_dev/lib/src/base/CMakeLists.txt 2023-09-26 13:00:18.000000000 +0200
+@@ -203,7 +203,7 @@
+ else ()
+ target_compile_definitions (persalysbase PUBLIC PERSALYS_BASE_STATIC)
+ endif ()
+-
++target_compile_options(persalysbase PUBLIC -DBOOST_ALL_DYN_LINK)
+ target_include_directories (persalysbase PRIVATE ${Boost_INCLUDE_DIRS})
+ target_include_directories (persalysbase PRIVATE ${Python_INCLUDE_DIRS})
+
+@@ -220,8 +220,8 @@
+ set_target_properties (persalysbase PROPERTIES VERSION ${LIB_VERSION})
+ set_target_properties (persalysbase PROPERTIES SOVERSION ${LIB_SOVERSION})
+
+-target_link_libraries (persalysbase PUBLIC ${PERSALYS_PUBLIC_LIBRARIES})
+-target_link_libraries (persalysbase PRIVATE ${PERSALYS_PRIVATE_LIBRARIES})
++target_link_libraries (persalysbase PUBLIC "${PERSALYS_PUBLIC_LIBRARIES};${Boost_LIBRARIES};${Boost_FILESYSTEM_LIBRARY_RELEASE}")
++target_link_libraries (persalysbase PRIVATE "${PERSALYS_PRIVATE_LIBRARIES};${Boost_LIBRARIES};${Boost_FILESYSTEM_LIBRARY_RELEASE}")
+
+ install (TARGETS persalysbase
+ RUNTIME DESTINATION ${PERSALYS_BIN_PATH}
--- /dev/null
+--- otrobopt-0.12_ref/lib/src/MeasureEvaluation.cxx 2023-09-13 14:59:42.000000000 +0200
++++ otrobopt-0.12_dev/lib/src/MeasureEvaluation.cxx 2023-09-26 12:11:25.339902064 +0200
+@@ -23,40 +23,20 @@
+ #include <openturns/PersistentObjectFactory.hxx>
+ #include <openturns/ResourceMap.hxx>
+ #include <openturns/GaussKronrodRule.hxx>
++#include <mutex>
+
+ using namespace OT;
+
+ namespace OTROBOPT
+ {
+
+-
+-static pthread_mutex_t OTRobOptResourceMap_InstanceMutex_;
+-static UnsignedInteger OTRobOptResourceMap_initialized_ = 0;
+-
+-class OTRobOptResourceMap_init
++struct OTRobOptResourceMap_init
+ {
+-public:
+ OTRobOptResourceMap_init()
+ {
+-
+- if (!OTRobOptResourceMap_initialized_)
++ static std::once_flag flag;
++ std::call_once(flag, [&]()
+ {
+-#ifndef OT_MUTEXINIT_NOCHECK
+- pthread_mutexattr_t attr;
+- pthread_mutexattr_init( &attr );
+- pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE );
+- pthread_mutex_init(&OTRobOptResourceMap_InstanceMutex_, &attr);
+-#else
+- pthread_mutex_init(&OTRobOptResourceMap_InstanceMutex_, NULL);
+-#endif
+- // openturns<1.15
+-#ifndef OPENTURNS_VERSION
+-#define AddAsScalar SetAsScalar
+-#define AddAsUnsignedInteger SetAsUnsignedInteger
+-#define AddAsBool SetAsBool
+-#define AddAsScalar SetAsScalar
+-#endif
+- // SequentialMonteCarloRobustAlgorithm
+ ResourceMap::AddAsScalar("SequentialMonteCarloRobustAlgorithm-ConvergenceFactor", 1e-2);
+ ResourceMap::AddAsUnsignedInteger("SequentialMonteCarloRobustAlgorithm-DefaultInitialSamplingSize", 10);
+
+@@ -67,21 +47,11 @@
+
+ ResourceMap::AddAsUnsignedInteger("IndividualChanceMeasure-GaussKronrodRule", GaussKronrodRule::G7K15);
+ ResourceMap::AddAsUnsignedInteger("JointChanceMeasure-GaussKronrodRule", GaussKronrodRule::G7K15);
+- OTRobOptResourceMap_initialized_ = 1;
+- }
+- assert(OTRobOptResourceMap_initialized_);
++ });
+ }
+-
+- ~OTRobOptResourceMap_init()
+- {
+- if (OTRobOptResourceMap_initialized_)
+- pthread_mutex_destroy(&OTRobOptResourceMap_InstanceMutex_);
+- OTRobOptResourceMap_initialized_ = 0;
+- }
+-
+ };
+
+-static const OTRobOptResourceMap_init static_initializer_OTRobOptResourceMap;
++static const OTRobOptResourceMap_init __OTRobOptResourceMap_initializer;
+
+ CLASSNAMEINIT(MeasureEvaluation)
+
--- /dev/null
+--- openturns-1.21_ref/openturns-1.21/lib/src/Base/Common/openturns/Log.hxx 2023-09-13 14:59:40.000000000 +0200
++++ openturns-1.21_dev/openturns-1.21/lib/src/Base/Common/openturns/Log.hxx 2023-09-26 14:28:12.567657677 +0200
+@@ -21,6 +21,12 @@
+ #ifndef OPENTURNS_LOG_HXX
+ #define OPENTURNS_LOG_HXX
+
++#ifdef WIN32
++ #ifdef ERROR
++ #undef ERROR
++ #endif
++#endif
++
+ #include <fstream>
+ #include <map>
+ #include "openturns/OTprivate.hxx"