From: Nabil Ghodbane Date: Thu, 2 May 2024 15:40:11 +0000 (+0200) Subject: spns #41606: SALOME modules python 3.9/visual c++ >=2019 compatibility X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ee84323be1f1777fcf9b100b1143247e37e2d5d7;p=tools%2Fsat_salome.git spns #41606: SALOME modules python 3.9/visual c++ >=2019 compatibility --- diff --git a/products/FIELDS.pyconf b/products/FIELDS.pyconf index 4e0ee6c..b5acf2a 100755 --- a/products/FIELDS.pyconf +++ b/products/FIELDS.pyconf @@ -40,6 +40,16 @@ default_MPI : ] } +version_V9_10_0: +{ + patches: [] +} + +version_V9_10_0_win: +{ + patches: ["FIELDS-9.10.0-visual-2019.patch"] +} + version_V9_10_0_MPI : { cmake_options : "-DSALOME_USE_MPI=ON -DMEDCOUPLING_USE_64BIT_IDS=ON" diff --git a/products/GEOM.pyconf b/products/GEOM.pyconf index 57174d9..4995b88 100644 --- a/products/GEOM.pyconf +++ b/products/GEOM.pyconf @@ -75,6 +75,37 @@ default_win : ] } +version_V9_10_0: +{ +} + +version_V9_10_0_win : +{ + cmake_options : " -DSWIG_EXECUTABLE=%SWIG_ROOT_DIR:\=/%/bin/swig.exe -DSALOME_GEOM_USE_OPENCV=ON -DOPENCV_ROOT_DIR=%OPENCV_ROOT_DIR:\=/% -DOpenCV_INCLUDE_DIRS=%OpenCV_INCLUDE_DIRS:\=/% " + depend : ["KERNEL", + "GUI", + "boost", + "CAS", + "Python", + "hdf5", + "omniORB", + "qt", + "ParaView", + "docutils", + "Sphinx", + "Jinja2", + "setuptools", + "Pygments", + "opencv", + "six", + "pytz", + "psutil", + "sphinxintl" + ] + patches : ['GEOM-9.10.0-visual-2019.patch'] + nb_proc : 1 +} + version_V9_4_0_to_V9_6_0 : { depend : ["KERNEL", diff --git a/products/GUI.pyconf b/products/GUI.pyconf index 9f804e0..1598824 100644 --- a/products/GUI.pyconf +++ b/products/GUI.pyconf @@ -72,6 +72,16 @@ default_win : } +version_V9_10_0: +{ + patches: [] +} + +version_V9_10_0_win: +{ + patches: ["GUI-9.10.0-cmath-visual-2019.patch"] +} + version_V9_5_0: { cmake_options : "-DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" diff --git a/products/KERNEL.pyconf b/products/KERNEL.pyconf index 637a8d8..747baf8 100644 --- a/products/KERNEL.pyconf +++ b/products/KERNEL.pyconf @@ -299,6 +299,42 @@ ALAMOS_SALOME_9_win : } } +version_ALAMOS_SALOME_9_10_0_win : +{ + name : "KERNEL" + build_source : "cmake" + cmake_options : " -DSWIG_EXECUTABLE=%SWIG_ROOT_DIR:\=/%/bin/swig.exe" + depend : ["Python", + "boost", + "numpy", + "lapack", + "hdf5", + "omniORB", + "omniORBpy", + "docutils", + "graphviz", + "libxml2", + "Sphinx", + "sphinxintl", + "Jinja2", + "setuptools", + "Pygments", + "pytz", + "pthreads" + ] + build_depend : ["cmake", "swig", "doxygen", "cppunit"] + get_source : "git" + git_info: + { + repo : $PROJECTS.projects.salome.git_info.default_git_server + "modules/kernel.git" + repo_dev : $PROJECTS.projects.salome.git_info.default_git_server_dev + "kernel.git" + } + environ : + { + } + patches: ['KERNEL-9.10.0-visual-2019.patch'] +} + # this section is equivalent with version_7_8_0_to_8_4_0, without LIBBATCH ALAMOS : { diff --git a/products/MEDCOUPLING.pyconf b/products/MEDCOUPLING.pyconf index ad2eb2d..d6af3cf 100644 --- a/products/MEDCOUPLING.pyconf +++ b/products/MEDCOUPLING.pyconf @@ -187,6 +187,16 @@ default_32BIT_IDS_MPI_STD : opt_depend : ["ParMetis", "metis"] } +version_V9_10_0: +{ + patches: [] +} + +version_V9_10_0_win: +{ + patches: ["MEDCOUPLING-9.10.0-visual-2019.patch"] +} + version_V9_10_0_MPI_STD : { cmake_options : "-DMEDCOUPLING_ENABLE_PYTHON=ON -DMEDCOUPLING_ENABLE_PARTITIONER=OFF -DMEDCOUPLING_ENABLE_RENUMBER=ON -DMEDCOUPLING_PARTITIONER_METIS=OFF -DMEDCOUPLING_PARTITIONER_SCOTCH=ON -DMEDCOUPLING_PARTITIONER_PARMETIS=ON -DMEDCOUPLING_MICROMED=OFF -DMEDCOUPLING_USE_MPI=ON -DSALOME_USE_MPI=ON -DMEDCOUPLING_USE_64BIT_IDS=ON -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER} -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}" diff --git a/products/compil_scripts/root-6.24.bat b/products/compil_scripts/root-6.24.bat index b35bff4..eb33339 100644 --- a/products/compil_scripts/root-6.24.bat +++ b/products/compil_scripts/root-6.24.bat @@ -23,7 +23,6 @@ mkdir %BUILD_DIR% SET CMAKE_OPTIONS= SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/% set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE:STRING=%PRODUCT_BUILD_TYPE% -set CMAKE_OPTIONS=%CMAKE_OPTIONS% -A Win32 -Thost=x64 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_CXX_STANDARD=14 set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_fftw3=OFF set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPYTHON_EXECUTABLE=%PYTHONBIN% @@ -45,8 +44,8 @@ set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_xxhash=OFF set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_zlib=OFF set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dbuiltin_zstd=OFF set CMAKE_OPTIONS=%CMAKE_OPTIONS% -Dmathmore=OFF -set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR=%CMAKE_GENERATOR% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -G %CMAKE_GENERATOR% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -A x64 cd %BUILD_DIR% SET INCLUDE= @@ -65,10 +64,10 @@ if NOT %ERRORLEVEL% == 0 ( echo. echo -------------------------------------------------------------------------- -echo *** msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x86 ALL_BUILD.vcxproj +echo *** msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x64 ALL_BUILD.vcxproj echo -------------------------------------------------------------------------- -msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x86 ALL_BUILD.vcxproj +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild ALL_BUILD.vcxproj exit 2 @@ -76,10 +75,10 @@ if NOT %ERRORLEVEL% == 0 ( echo. echo -------------------------------------------------------------------------- -echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x86 INSTALL.vcxproj +echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 INSTALL.vcxproj echo -------------------------------------------------------------------------- -msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x86 INSTALL.vcxproj +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 INSTALL.vcxproj if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild INSTALL.vcxproj exit 3 diff --git a/products/opencv.pyconf b/products/opencv.pyconf index efbb175..a07784e 100644 --- a/products/opencv.pyconf +++ b/products/opencv.pyconf @@ -70,7 +70,7 @@ version_3_2_0_DB12 : version_3_2_0_win : { patches : ["opencv-3.2.0-ccache.patch", - "opencv-3.2.0_windows.patch", + "opencv-3.2.0-msvc-version.patch", "SPNS-29988-opencv-3.2.0-cv2.patch" ] } diff --git a/products/patches/FIELDS-9.10.0-visual-2019.patch b/products/patches/FIELDS-9.10.0-visual-2019.patch new file mode 100755 index 0000000..dbc33f7 --- /dev/null +++ b/products/patches/FIELDS-9.10.0-visual-2019.patch @@ -0,0 +1,12 @@ +diff --git a/src/MEDCouplingCorba_Swig/CMakeLists.txt b/src/MEDCouplingCorba_Swig/CMakeLists.txt +index c189405f5..cf976dc06 100644 +--- a/src/MEDCouplingCorba_Swig/CMakeLists.txt ++++ b/src/MEDCouplingCorba_Swig/CMakeLists.txt +@@ -63,6 +63,7 @@ ENDIF() + SWIG_LINK_LIBRARIES(MEDCouplingCorba ${PYTHON_LIBRARIES} medcouplingcorba ${PLATFORM_LIBS}) + IF(WIN32) + SET_TARGET_PROPERTIES(_MEDCouplingCorba PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingCorba_d) ++ TARGET_COMPILE_OPTIONS(_MEDCouplingCorba PRIVATE /bigobj) + ENDIF(WIN32) + + INSTALL(TARGETS _MEDCouplingCorba DESTINATION ${SALOME_INSTALL_PYTHON}) diff --git a/products/patches/GEOM-9.10.0-visual-2019.patch b/products/patches/GEOM-9.10.0-visual-2019.patch new file mode 100644 index 0000000..c943782 --- /dev/null +++ b/products/patches/GEOM-9.10.0-visual-2019.patch @@ -0,0 +1,24 @@ +diff --git a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx +index 4727a5c5d..f9cff2743 100644 +--- a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx ++++ b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx +@@ -21,14 +21,13 @@ + // + + #ifdef WIN32 +-// E.A. : On windows with python 2.6, there is a conflict +-// E.A. : between pymath.h and Standard_math.h which define +-// E.A. : some same symbols : acosh, asinh, ... +-#include +-#include ++ #include ++ #include ++ #include ++#else ++ #include + #endif + +-#include + #include + + #ifdef HAVE_FINITE diff --git a/products/patches/GUI-9.10.0-visual-2019.patch b/products/patches/GUI-9.10.0-visual-2019.patch new file mode 100755 index 0000000..e23ce2e --- /dev/null +++ b/products/patches/GUI-9.10.0-visual-2019.patch @@ -0,0 +1,130 @@ +diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx +index 718efbd13..8ed49c997 100644 +--- a/src/LightApp/LightApp_Application.cxx ++++ b/src/LightApp/LightApp_Application.cxx +@@ -30,6 +30,7 @@ + // E.A. : some same symbols : acosh, asinh, ... + #include + #ifndef DISABLE_PYCONSOLE ++ #include + #include + #endif + #endif +diff --git a/src/Qtx/QtxRubberBand.cxx b/src/Qtx/QtxRubberBand.cxx +index 68908bd00..f078aa0c6 100644 +--- a/src/Qtx/QtxRubberBand.cxx ++++ b/src/Qtx/QtxRubberBand.cxx +@@ -29,9 +29,11 @@ + #include + #include + #include +- +-#include +- ++#if defined(_MSC_VER) && _MSC_VER >= 1920 ++ #include ++#else ++ #include ++#endif + /*! + \class QtxAbstractRubberBand + \brief Analog of class QRubberBand with possibility of creation non-rectangular contour for selection. +diff --git a/src/SALOME_PY/SalomePy.cxx b/src/SALOME_PY/SalomePy.cxx +index bcdd520f1..bb648866d 100644 +--- a/src/SALOME_PY/SalomePy.cxx ++++ b/src/SALOME_PY/SalomePy.cxx +@@ -25,11 +25,9 @@ + // Author : Paul RASCLE, EDF + // + #ifdef WIN32 +-// E.A. : On windows with python 2.6, there is a conflict +-// E.A. : between pymath.h and Standard_math.h which define +-// E.A. : some same symbols : acosh, asinh, ... +-#include +-#include ++ #include ++ #include ++ #include + #endif + + #include +diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx +index eea242463..f71ba517f 100644 +--- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx ++++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx +@@ -24,11 +24,9 @@ + // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) + + #ifdef WIN32 +-// E.A. : On windows with python 2.6, there is a conflict +-// E.A. : between pymath.h and Standard_math.h which define +-// E.A. : some same symbols : acosh, asinh, ... +-#include +-#include ++ #include ++ #include ++ #include + #endif + + #include "SALOME_PYQT_ModuleLight.h" // this include must be first!!! +diff --git a/src/SUIT/SUIT_DataObjectKey.cxx b/src/SUIT/SUIT_DataObjectKey.cxx +index a68031b2b..5c53249cf 100644 +--- a/src/SUIT/SUIT_DataObjectKey.cxx ++++ b/src/SUIT/SUIT_DataObjectKey.cxx +@@ -25,10 +25,14 @@ + #include + + #ifndef WIN32 +-#include +-#define _typeinfo std::type_info ++ #include ++ #define _typeinfo std::type_info + #else +-#include ++ #if defined(_MSC_VER) && _MSC_VER >= 1920 ++ #include ++ #else ++ #include ++ #endif + #define _typeinfo type_info + #endif + +diff --git a/src/SUIT/SUIT_DataOwner.cxx b/src/SUIT/SUIT_DataOwner.cxx +index 31fa5f047..a0c643d99 100644 +--- a/src/SUIT/SUIT_DataOwner.cxx ++++ b/src/SUIT/SUIT_DataOwner.cxx +@@ -23,10 +23,14 @@ + #include "SUIT_DataOwner.h" + + #ifndef WIN32 +-#include +-#define _typeinfo std::type_info ++ #include ++ #define _typeinfo std::type_info + #else +-#include ++ #if defined(_MSC_VER) && _MSC_VER >= 1920 ++ #include ++ #else ++ #include ++ #endif + #define _typeinfo type_info + #endif + +diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx +index 1e9492add..06ec03c08 100644 +--- a/src/SalomeApp/SalomeApp_Application.cxx ++++ b/src/SalomeApp/SalomeApp_Application.cxx +@@ -25,11 +25,9 @@ + // Author: Sergey LITONIN + + #ifdef WIN32 +- // E.A. : On windows with python 2.6, there is a conflict +- // E.A. : between pymath.h and Standard_math.h which define +- // E.A. : some same symbols : acosh, asinh, ... + #include + #ifndef DISABLE_PYCONSOLE ++ #include + #include + #endif + #endif diff --git a/products/patches/KERNEL-9.10.0-visual-2019.patch b/products/patches/KERNEL-9.10.0-visual-2019.patch new file mode 100755 index 0000000..342d3e9 --- /dev/null +++ b/products/patches/KERNEL-9.10.0-visual-2019.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 282f4219e..dc84fb297 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -92,6 +92,9 @@ FIND_PACKAGE(SalomeBoost REQUIRED) + + # Optional prerequisites + # ====================== ++IF(WIN32 AND MSVC_VERSION AND MSVC_VERSION VERSION_GREATER_EQUAL 1920) ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_STRUCT_TIMESPEC") ++ENDIF() + + IF(NOT SALOME_LIGHT_ONLY) + FIND_PACKAGE(SalomeOmniORB REQUIRED) diff --git a/products/patches/MEDCOUPLING-9.10.0-visual-2019.patch b/products/patches/MEDCOUPLING-9.10.0-visual-2019.patch new file mode 100755 index 0000000..fce1b13 --- /dev/null +++ b/products/patches/MEDCOUPLING-9.10.0-visual-2019.patch @@ -0,0 +1,13 @@ +diff --git a/src/MEDCoupling_Swig/CMakeLists.txt b/src/MEDCoupling_Swig/CMakeLists.txt +index 125dda07..cecb3ff9 100644 +--- a/src/MEDCoupling_Swig/CMakeLists.txt ++++ b/src/MEDCoupling_Swig/CMakeLists.txt +@@ -165,6 +165,8 @@ ENDIF(WIN32) + IF(WIN32) + SET_TARGET_PROPERTIES(_MEDCouplingRemapper PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingRemapper_d) + SET_TARGET_PROPERTIES(_${MEDCouling_target_name} PROPERTIES DEBUG_OUTPUT_NAME _${MEDCouling_target_name}_d) ++ TARGET_COMPILE_OPTIONS(_MEDCouplingRemapper PRIVATE /bigobj) ++ TARGET_COMPILE_OPTIONS(_${MEDCouling_target_name} PRIVATE /bigobj) + ENDIF(WIN32) + INSTALL(TARGETS ${SWIG_MODULE_${MEDCouling_target_name}_REAL_NAME} ${SWIG_MODULE_MEDCouplingRemapper_REAL_NAME} DESTINATION ${MEDCOUPLING_INSTALL_PYTHON}) + diff --git a/products/patches/opencv-3.2.0-msvc-version.patch b/products/patches/opencv-3.2.0-msvc-version.patch new file mode 100644 index 0000000..f2bae30 --- /dev/null +++ b/products/patches/opencv-3.2.0-msvc-version.patch @@ -0,0 +1,43 @@ +--- opencv-3.2.0_ref/cmake/OpenCVDetectCXXCompiler.cmake 2019-07-16 15:47:28.000000000 +0200 ++++ opencv-3.2.0_dev/cmake/OpenCVDetectCXXCompiler.cmake 2024-05-02 12:37:03.522774641 +0200 +@@ -162,6 +162,14 @@ + set(OpenCV_RUNTIME vc14) + elseif(MSVC_VERSION EQUAL 1910) + set(OpenCV_RUNTIME vc15) ++ elseif(MSVC_VERSION EQUAL 1916) ++ set(OpenCV_RUNTIME vc15) ++ elseif(MSVC_VERSION VERSION_GREATER_EQUAL 1920 AND MSVC_VERSION LESS_EQUAL 1929 ) ++ set(OpenCV_RUNTIME vc15) # done on purpose ++ elseif(MSVC_VERSION VERSION_GREATER_EQUAL 1930 AND MSVC_VERSION LESS_EQUAL 1939 ) ++ set(OpenCV_RUNTIME vc15) # done on purpose ++ else() ++ MESSAGE(FATAL "MSVC_VERSION value ${MSVC_VERSION} not supported") + endif() + elseif(MINGW) + set(OpenCV_RUNTIME mingw) +--- opencv-3.2.0_ref/cmake/templates/OpenCVConfig.root-WIN32.cmake.in 2019-07-16 15:47:28.000000000 +0200 ++++ opencv-3.2.0_dev/cmake/templates/OpenCVConfig.root-WIN32.cmake.in 2024-05-02 12:36:11.747223041 +0200 +@@ -80,6 +80,14 @@ + set(OpenCV_RUNTIME vc14) + elseif(MSVC_VERSION EQUAL 1910) + set(OpenCV_RUNTIME vc15) ++ elseif(MSVC_VERSION EQUAL 1916) ++ set(OpenCV_RUNTIME vc15) ++ elseif(MSVC_VERSION VERSION_GREATER_EQUAL 1920 AND MSVC_VERSION LESS_EQUAL 1929 ) ++ set(OpenCV_RUNTIME vc15) # done on purpose ++ elseif(MSVC_VERSION VERSION_GREATER_EQUAL 1930 AND MSVC_VERSION LESS_EQUAL 1939 ) ++ set(OpenCV_RUNTIME vc15) # done on purpose ++ else() ++ MESSAGE(FATAL "MSVC_VERSION value ${MSVC_VERSION} not supported") + endif() + elseif(MINGW) + set(OpenCV_RUNTIME mingw) +@@ -115,6 +123,8 @@ + else() + set(OpenCV_LIB_PATH "${OpenCV_CONFIG_PATH}/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib") + endif() ++ else(EXISTS "${OpenCV_CONFIG_PATH}/lib/OpenCVConfig.cmake") ++ set(OpenCV_LIB_PATH "${OpenCV_CONFIG_PATH}/lib") + endif() + endif() + diff --git a/products/root.pyconf b/products/root.pyconf index 7cdb7b5..90ac5dd 100644 --- a/products/root.pyconf +++ b/products/root.pyconf @@ -32,13 +32,13 @@ default_win: patches : [] } -version_6_24_00: +version_6_24_06: { get_source : "archive" patches : [] } -version_6_24_00_win: +version_6_24_06_win: { build_source : "script" compil_script : "root-6.24.bat"