From: Nabil Ghodbane Date: Wed, 23 Mar 2022 11:18:14 +0000 (+0100) Subject: spns #26828: ParaView netcdf and gdal support: had to apply fix suggested at this... X-Git-Tag: V9_9_0~130 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0fc6d8a87c4c6ee9dcb290589b4c8ee2f400496f;p=tools%2Fsat_salome.git spns #26828: ParaView netcdf and gdal support: had to apply fix suggested at this link: https://github.com/Unidata/netcdf-c/issues/1533 - namely help CMake find HDF --- diff --git a/products/ParaView.pyconf b/products/ParaView.pyconf index 081700c..03a9861 100755 --- a/products/ParaView.pyconf +++ b/products/ParaView.pyconf @@ -19,7 +19,7 @@ default : 'cgns', 'Pygments' ] - opt_depend : ['openmpi', 'ospray','tbb', 'openturns', 'rkCommon', 'gdal'] + opt_depend : ['openmpi', 'ospray','tbb', 'openturns', 'rkCommon', 'gdal', 'netcdf'] build_depend : ["cmake"] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name @@ -151,7 +151,7 @@ version_5_9_1_MPI : version_5_9_0 : { - opt_depend : ['openmpi', 'ospray','tbb', 'openturns', 'gdal'] + opt_depend : ['openmpi', 'ospray','tbb', 'openturns', 'gdal', 'netcdf'] compil_script : 'ParaView-5.9.0.sh' archive_info : {archive_name : "ParaView-5.9.0-lata.tar.gz"} # two other LATA patches already included in archive diff --git a/products/compil_scripts/ParaView-5.9.0.sh b/products/compil_scripts/ParaView-5.9.0.sh index e12a8a0..f65d2ec 100755 --- a/products/compil_scripts/ParaView-5.9.0.sh +++ b/products/compil_scripts/ParaView-5.9.0.sh @@ -162,7 +162,7 @@ fi ### HDF5 settings CMAKE_OPTIONS+=" -DVTK_MODULE_USE_EXTERNAL_VTK_hdf5:BOOL=ON" -CMAKE_OPTIONS+=" -DHDF5_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5" +###CMAKE_OPTIONS+=" -DHDF5_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5" CMAKE_OPTIONS+=" -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF" CMAKE_OPTIONS+=" -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" CMAKE_OPTIONS+=" -DHDF5_hdf5_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib" @@ -170,6 +170,9 @@ CMAKE_OPTIONS+=" -DHDF5_hdf5_hl_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib/libhdf5_hl. CMAKE_OPTIONS+=" -DHDF5_hdf5_CXX_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib/libhdf5_cpp.so" CMAKE_OPTIONS+=" -DHDF5_HL_LIBRARY=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" CMAKE_OPTIONS+=" -DHDF5_C_INCLUDE_DIR=${HDF5_ROOT_DIR}/include" +CMAKE_OPTIONS+=" -DHDF5_HL_LIBRARY=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" +CMAKE_OPTIONS+=" -DHDF5_C_LIBRARY=${HDF5_ROOT_DIR}/lib/libhdf5.so" +CMAKE_OPTIONS+=" -DHDF5_INCLUDE_DIR=${HDF5_ROOT_DIR}/include" ### CGNS CMAKE_OPTIONS+=" -DVTK_MODULE_USE_EXTERNAL_ParaView_cgns:BOOL=ON" if [ "$CGNS_ROOT_DIR" != "/usr" ] @@ -247,19 +250,21 @@ if [ -n "$GDAL_ROOT_DIR" ]; then CMAKE_OPTIONS+=" -DGDAL_LIBRARY=$GDAL_ROOT_DIR/lib/libgdal.so" CMAKE_OPTIONS+=" -DGDAL_INCLUDE_DIR=$GDAL_ROOT_DIR/include" fi -# CMAKE_OPTIONS+=" -DPARAVIEW_GENERATE_PROXY_DOCUMENTATION:BOOL=ON" -# CMAKE_OPTIONS+=" -DPARAVIEW_PLUGIN_ENABLE_GeographicalMap:BOOL=ON" + CMAKE_OPTIONS+=" -DPARAVIEW_GENERATE_PROXY_DOCUMENTATION:BOOL=ON" + CMAKE_OPTIONS+=" -DPARAVIEW_PLUGIN_ENABLE_GeographicalMap:BOOL=ON" fi # NETCDF see bos #26944 -# if [ -n "$NETCDF_ROOT_DIR" ]; then -# echo "INFO: switching ON NETCDF" -# CMAKE_OPTIONS+=" -DVTK_MODULE_USE_EXTERNAL_VTK_netcdf:BOOL=ON" -# if [ "NETCDF_ROOT_DIR" != "/usr" ]; then -# CMAKE_OPTIONS+=" -DNETCDF_ROOT_DIR=$NETCDF_ROOT_DIR" -# fi -# CMAKE_OPTIONS+=" -DVTK_MODULE_ENABLE_VTK_FiltersParallelGeometry=YES" -# fi +if [ -n "$NETCDF_ROOT_DIR" ]; then + echo "INFO: switching ON NETCDF" + CMAKE_OPTIONS+=" -DVTK_MODULE_USE_EXTERNAL_VTK_netcdf:BOOL=ON" + if [ "NETCDF_ROOT_DIR" != "/usr" ]; then + CMAKE_OPTIONS+=" -DNETCDF_ROOT_DIR=$NETCDF_ROOT_DIR" + CMAKE_OPTIONS+=" -Dnetcdf_DIR=$NETCDF_ROOT_DIR/lib/cmake/netCDF" +# CMAKE_OPTIONS+=" -DCMAKE_PREFIX_PATH=$NETCDF_ROOT_DIR/lib/cmake/netCDF" + fi + CMAKE_OPTIONS+=" -DVTK_MODULE_ENABLE_VTK_FiltersParallelGeometry=YES" +fi echo echo "*** cmake" ${CMAKE_OPTIONS} diff --git a/products/compil_scripts/netcdf-4.6.2.sh b/products/compil_scripts/netcdf-4.6.2.sh index d226a3a..3ed6464 100755 --- a/products/compil_scripts/netcdf-4.6.2.sh +++ b/products/compil_scripts/netcdf-4.6.2.sh @@ -33,6 +33,8 @@ if [ -n "$HDF5_ROOT_DIR" ] && [ "${HDF5_ROOT_DIR}" != "/usr" ]; then CMAKE_OPTIONS+=" -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF" CMAKE_OPTIONS+=" -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" CMAKE_OPTIONS+=" -DHDF5_HL_LIBRARY=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" + CMAKE_OPTIONS+=" -DHDF5_C_LIBRARY=${HDF5_ROOT_DIR}/lib/libhdf5.so" + CMAKE_OPTIONS+=" -DHDF5_INCLUDE_DIR=${HDF5_ROOT_DIR}/include" fi ### libxml2 settings