--- /dev/null
+@echo off
+
+echo ##########################################################################
+echo med %VERSION%
+echo ##########################################################################
+
+IF NOT DEFINED SAT_DEBUG (
+ SET SAT_DEBUG=0
+)
+
+IF NOT DEFINED CMAKE_GENERATOR (
+ SET CMAKE_GENERATOR="Visual Studio 15 2017"
+)
+
+SET PRODUCT_BUILD_TYPE=Release
+IF DEFINED SAT_CMAKE_BUILD_TYPE (
+ SET PRODUCT_BUILD_TYPE=%SAT_CMAKE_BUILD_TYPE%
+)
+
+if %SAT_DEBUG% == 1 (
+ set PRODUCT_BUILD_TYPE=Debug
+)
+
+if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
+REM clean BUILD directory
+if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
+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% -DMEDFILE_BUILD_STATIC_LIBS:BOOL=OFF
+SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DMEDFILE_BUILD_SHARED_LIBS:BOOL=ON
+SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DHDF5_ROOT_DIR:STRING=%HDF5_ROOT_DIR%
+SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_IMPORT_LIBRARY_PREFIX=""
+SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_IMPORT_LIBRARY_SUFFIX=".lib"
+SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_Fortran_FLAGS="-fimplicit-none -i8"
+if DEFINED SALOME_USE_64BIT_IDS (
+ SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DMED_MEDINT_TYPE:STRING="long long"
+)
+
+if DEFINED SAT_HPC (
+ SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DMEDFILE_USE_MPI:BOOL=ON
+) else (
+ SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DMEDFILE_USE_MPI:BOOL=OFF
+)
+
+SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -G %CMAKE_GENERATOR% -A x64
+
+cd %BUILD_DIR%
+
+echo.
+echo --------------------------------------------------------------------------
+echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
+echo --------------------------------------------------------------------------
+
+%CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
+if NOT %ERRORLEVEL% == 0 (
+ echo ERROR on CMake
+ exit 1
+)
+
+echo.
+echo --------------------------------------------------------------------------
+echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj
+echo --------------------------------------------------------------------------
+
+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
+)
+
+echo.
+echo --------------------------------------------------------------------------
+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=x64 INSTALL.vcxproj
+if NOT %ERRORLEVEL% == 0 (
+ echo ERROR on msbuild INSTALL.vcxproj
+ exit 3
+)
+
+REM rename documentation directory
+cd %PRODUCT_INSTALL%\share\doc
+mv med-fichier* med
+
+taskkill /F /IM "mspdbsrv.exe"
+
+
+echo.
+echo ########## END
--- /dev/null
+--- med-4.1.1/src/CMakeLists.txt 2024-09-04 10:56:33.719528869 +0200
++++ med-4.1.1_update/src/CMakeLists.txt 2024-09-05 13:34:58.928896824 +0200
+@@ -1,151 +1,151 @@
+-INCLUDE_DIRECTORIES(
+- ${HDF5_INCLUDE_DIRS}
+- ${MPI_INCLUDE_DIRS})
+-
+-# On Win platform, we need to make sure symbols are properly exported in
+-# the intermediary OBJECT targes built in the sub-directories:
+-# The definition "-D<target>_EXPORTS" is normally added automatically by CMake
+-# when building Win DLL,
+-# but this doesn't work when using intermediary targets (ADD_LIBRARY(... OBJECT ...)
+-IF(WIN32)
+- ADD_DEFINITIONS(-DmedC_EXPORTS)
+-ENDIF()
+-
+-# Specific include logic - see CMakeLists.txt inside:
+-ADD_SUBDIRECTORY("2.3.6")
+-
+-# Important: the following include comes AFTER the subdirectory 2.3.6
+-# to ensure the include works properly (2.3.6 includes are specific)
+-INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include
+- ${PROJECT_SOURCE_DIR}/include)
+-
+-# Get pure C intermediary targets:
+-ADD_SUBDIRECTORY(hdfi)
+-ADD_SUBDIRECTORY(ci)
+-ADD_SUBDIRECTORY(misc)
+-
+-IF(CMAKE_Fortran_COMPILER_WORKS)
+- # Build intermediate targets _cfi, _cfi_static and _fi:
+- ADD_SUBDIRECTORY(cfi)
+- ADD_SUBDIRECTORY(fi)
+-
+- SET(medfort_wrap_SOURCES
+- MEDiteratorsF.f
+- $<TARGET_OBJECTS:_fi236>
+- $<TARGET_OBJECTS:_fi>
+- $<TARGET_OBJECTS:_cfi236>
+- $<TARGET_OBJECTS:_cfi>
+- )
+-
+- SET(medfort_static_wrap_SOURCES
+- MEDiteratorsF.f
+- $<TARGET_OBJECTS:_fi236>
+- $<TARGET_OBJECTS:_fi>
+- $<TARGET_OBJECTS:_cfi236_static>
+- $<TARGET_OBJECTS:_cfi_static>
+- )
+-ENDIF()
+-
+-SET(medC_SOURCES
+- MEDiterators.c
+- $<TARGET_OBJECTS:_ci236>
+- $<TARGET_OBJECTS:_hdfi236>
+- $<TARGET_OBJECTS:_misc236>
+- $<TARGET_OBJECTS:_med236>
+- $<TARGET_OBJECTS:_ci>
+- $<TARGET_OBJECTS:_misc>
+- $<TARGET_OBJECTS:_hdfi>
+-)
+-
+-SET(medC_static_SOURCES
+- MEDiterators.c
+- $<TARGET_OBJECTS:_ci236_static>
+- $<TARGET_OBJECTS:_hdfi236_static>
+- $<TARGET_OBJECTS:_misc236_static>
+- $<TARGET_OBJECTS:_med236_static>
+- $<TARGET_OBJECTS:_ci_static>
+- $<TARGET_OBJECTS:_misc_static>
+- $<TARGET_OBJECTS:_hdfi_static>
+-)
+-
+-########################### Pure C stuff ###################################
+-############################################################################
+-
+-### Installation preparation:
+-SET(_export_group "medfileTargets")
+-
+-######### Shared Libraries ##########
+-IF(MEDFILE_BUILD_SHARED_LIBS)
+- ADD_LIBRARY(medC SHARED ${medC_SOURCES})
+- SET_TARGET_PROPERTIES(medC PROPERTIES
+- SOVERSION 11
+- VERSION 11.1.1)
+- TARGET_LINK_LIBRARIES(medC ${HDF5_LIBS} ${MPI_LIBS})
+- MED_SET_DEFINITIONS(medC NOGDI)
+-
+- INSTALL(TARGETS medC EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})
+-ENDIF()
+-
+-######### Static Libraries ##########
+-##
+-## Target names are suffixed with "_static" but file
+-## names remain the same.
+-
+-IF(MEDFILE_BUILD_STATIC_LIBS)
+- ADD_LIBRARY(medC_static STATIC ${medC_SOURCES})
+- SET_TARGET_PROPERTIES(medC_static PROPERTIES OUTPUT_NAME medC)
+- TARGET_LINK_LIBRARIES(medC_static ${HDF5_LIBS} ${MPI_LIBS})
+- MED_SET_DEFINITIONS(medC_static NOGDI)
+-
+- INSTALL(TARGETS medC_static EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})
+-ENDIF()
+-
+-########################### Fortran stuff ###################################
+-#############################################################################
+-IF(CMAKE_Fortran_COMPILER_WORKS)
+-
+- ######### Shared Libraries ##########
+- IF(MEDFILE_BUILD_SHARED_LIBS)
+- ## Intermediate library - this is unavoidable
+- ## if we want the Fortran wrapper to build correctly under win.
+- ADD_LIBRARY(medfwrap SHARED ${medfort_wrap_SOURCES})
+- SET_TARGET_PROPERTIES(medfwrap PROPERTIES
+- SOVERSION 11
+- VERSION 11.1.1)
+- TARGET_LINK_LIBRARIES(medfwrap medC)
+- INSTALL(TARGETS medfwrap EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})
+-
+- # Add Shared MED library
+- ADD_LIBRARY(med SHARED MEDiterators.c)
+- SET_TARGET_PROPERTIES(med PROPERTIES
+- SOVERSION 11
+- VERSION 11.1.1)
+- TARGET_LINK_LIBRARIES(medfwrap medC)
+- TARGET_LINK_LIBRARIES(med medfwrap)
+-
+- # Install only the resulting library:
+- INSTALL(TARGETS med EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})
+- ENDIF()
+-
+- ######### Static Libraries ##########
+- ##
+- ## Target names are suffixed with "_static" but file
+- ## names remain the same.
+- IF(MEDFILE_BUILD_STATIC_LIBS)
+- ## Intermediate library - this is unavoidable
+- ## if we want the Fortran wrapper to build correctly under win.
+- ADD_LIBRARY(medfwrap_static STATIC ${medfort_wrap_SOURCES})
+- SET_TARGET_PROPERTIES(medfwrap_static PROPERTIES OUTPUT_NAME medfwrap)
+- TARGET_LINK_LIBRARIES(medfwrap_static medC_static)
+- INSTALL(TARGETS medfwrap_static EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})
+-
+- # Add Static MED library
+- ADD_LIBRARY(med_static STATIC MEDiterators.c)
+- SET_TARGET_PROPERTIES(med_static PROPERTIES OUTPUT_NAME med)
+- TARGET_LINK_LIBRARIES(med_static medfwrap_static)
+-
+- # Install only the resulting library:
+- INSTALL(TARGETS med_static EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})
+- ENDIF()
+-
+-ENDIF(CMAKE_Fortran_COMPILER_WORKS)
++INCLUDE_DIRECTORIES(\r
++ ${HDF5_INCLUDE_DIRS}\r
++ ${MPI_INCLUDE_DIRS})\r
++SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)\r
++# On Win platform, we need to make sure symbols are properly exported in\r
++# the intermediary OBJECT targes built in the sub-directories:\r
++# The definition "-D<target>_EXPORTS" is normally added automatically by CMake\r
++# when building Win DLL,\r
++# but this doesn't work when using intermediary targets (ADD_LIBRARY(... OBJECT ...)\r
++IF(WIN32)\r
++ ADD_DEFINITIONS(-DmedC_EXPORTS)\r
++ENDIF()\r
++ \r
++# Specific include logic - see CMakeLists.txt inside:\r
++ADD_SUBDIRECTORY("2.3.6")\r
++\r
++# Important: the following include comes AFTER the subdirectory 2.3.6\r
++# to ensure the include works properly (2.3.6 includes are specific)\r
++INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include \r
++ ${PROJECT_SOURCE_DIR}/include)\r
++\r
++# Get pure C intermediary targets:\r
++ADD_SUBDIRECTORY(hdfi)\r
++ADD_SUBDIRECTORY(ci)\r
++ADD_SUBDIRECTORY(misc)\r
++\r
++IF(CMAKE_Fortran_COMPILER_WORKS)\r
++ # Build intermediate targets _cfi, _cfi_static and _fi:\r
++ ADD_SUBDIRECTORY(cfi)\r
++ ADD_SUBDIRECTORY(fi)\r
++\r
++ SET(medfort_wrap_SOURCES\r
++ MEDiteratorsF.f \r
++ $<TARGET_OBJECTS:_fi236> \r
++ $<TARGET_OBJECTS:_fi>\r
++ $<TARGET_OBJECTS:_cfi236> \r
++ $<TARGET_OBJECTS:_cfi>\r
++ )\r
++ \r
++ SET(medfort_static_wrap_SOURCES\r
++ MEDiteratorsF.f \r
++ $<TARGET_OBJECTS:_fi236> \r
++ $<TARGET_OBJECTS:_fi>\r
++ $<TARGET_OBJECTS:_cfi236_static> \r
++ $<TARGET_OBJECTS:_cfi_static>\r
++ )\r
++ENDIF()\r
++\r
++SET(medC_SOURCES\r
++ MEDiterators.c\r
++ $<TARGET_OBJECTS:_ci236>\r
++ $<TARGET_OBJECTS:_hdfi236>\r
++ $<TARGET_OBJECTS:_misc236>\r
++ $<TARGET_OBJECTS:_med236>\r
++ $<TARGET_OBJECTS:_ci>\r
++ $<TARGET_OBJECTS:_misc>\r
++ $<TARGET_OBJECTS:_hdfi> \r
++)\r
++\r
++SET(medC_static_SOURCES\r
++ MEDiterators.c\r
++ $<TARGET_OBJECTS:_ci236_static>\r
++ $<TARGET_OBJECTS:_hdfi236_static>\r
++ $<TARGET_OBJECTS:_misc236_static>\r
++ $<TARGET_OBJECTS:_med236_static>\r
++ $<TARGET_OBJECTS:_ci_static>\r
++ $<TARGET_OBJECTS:_misc_static>\r
++ $<TARGET_OBJECTS:_hdfi_static> \r
++)\r
++\r
++########################### Pure C stuff ###################################\r
++############################################################################\r
++\r
++### Installation preparation:\r
++SET(_export_group "medfileTargets")\r
++\r
++######### Shared Libraries ##########\r
++IF(MEDFILE_BUILD_SHARED_LIBS)\r
++ ADD_LIBRARY(medC SHARED ${medC_SOURCES})\r
++ SET_TARGET_PROPERTIES(medC PROPERTIES\r
++ SOVERSION 11\r
++ VERSION 11.1.1)\r
++ TARGET_LINK_LIBRARIES(medC ${HDF5_LIBS} ${MPI_LIBS})\r
++ MED_SET_DEFINITIONS(medC NOGDI)\r
++ \r
++ INSTALL(TARGETS medC EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX}) \r
++ENDIF()\r
++\r
++######### Static Libraries ##########\r
++##\r
++## Target names are suffixed with "_static" but file \r
++## names remain the same.\r
++ \r
++IF(MEDFILE_BUILD_STATIC_LIBS)\r
++ ADD_LIBRARY(medC_static STATIC ${medC_SOURCES})\r
++ SET_TARGET_PROPERTIES(medC_static PROPERTIES OUTPUT_NAME medC)\r
++ TARGET_LINK_LIBRARIES(medC_static ${HDF5_LIBS} ${MPI_LIBS})\r
++ MED_SET_DEFINITIONS(medC_static NOGDI)\r
++ \r
++ INSTALL(TARGETS medC_static EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})\r
++ENDIF()\r
++\r
++########################### Fortran stuff ###################################\r
++#############################################################################\r
++IF(CMAKE_Fortran_COMPILER_WORKS)\r
++ \r
++ ######### Shared Libraries ##########\r
++ IF(MEDFILE_BUILD_SHARED_LIBS)\r
++ ## Intermediate library - this is unavoidable \r
++ ## if we want the Fortran wrapper to build correctly under win.\r
++ ADD_LIBRARY(medfwrap SHARED ${medfort_wrap_SOURCES})\r
++ SET_TARGET_PROPERTIES(medfwrap PROPERTIES\r
++ SOVERSION 11\r
++ VERSION 11.1.1)\r
++ TARGET_LINK_LIBRARIES(medfwrap medC)\r
++ INSTALL(TARGETS medfwrap EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})\r
++\r
++ # Add Shared MED library\r
++ ADD_LIBRARY(med SHARED MEDiterators.c)\r
++ SET_TARGET_PROPERTIES(med PROPERTIES\r
++ SOVERSION 11\r
++ VERSION 11.1.1)\r
++ TARGET_LINK_LIBRARIES(medfwrap medC)\r
++ TARGET_LINK_LIBRARIES(med medfwrap) \r
++ \r
++ # Install only the resulting library:\r
++ INSTALL(TARGETS med EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})\r
++ ENDIF()\r
++\r
++ ######### Static Libraries ##########\r
++ ##\r
++ ## Target names are suffixed with "_static" but file \r
++ ## names remain the same.\r
++ IF(MEDFILE_BUILD_STATIC_LIBS)\r
++ ## Intermediate library - this is unavoidable \r
++ ## if we want the Fortran wrapper to build correctly under win.\r
++ ADD_LIBRARY(medfwrap_static STATIC ${medfort_wrap_SOURCES})\r
++ SET_TARGET_PROPERTIES(medfwrap_static PROPERTIES OUTPUT_NAME medfwrap)\r
++ TARGET_LINK_LIBRARIES(medfwrap_static medC_static)\r
++ INSTALL(TARGETS medfwrap_static EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})\r
++ \r
++ # Add Static MED library\r
++ ADD_LIBRARY(med_static STATIC MEDiterators.c)\r
++ SET_TARGET_PROPERTIES(med_static PROPERTIES OUTPUT_NAME med)\r
++ TARGET_LINK_LIBRARIES(med_static medfwrap_static)\r
++\r
++ # Install only the resulting library: \r
++ INSTALL(TARGETS med_static EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})\r
++ ENDIF()\r
++ \r
++ENDIF(CMAKE_Fortran_COMPILER_WORKS)\r