From 6063497f92eba47b8a0da7c4fefbd7684bb454c8 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Fri, 5 May 2023 12:16:36 +0200 Subject: [PATCH] Add MESHGEMS VERSION environment variables --- products/compil_scripts/ParaView-5.11.1.sh | 12 ++++++++---- products/env_scripts/MeshGems.py | 7 ++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/products/compil_scripts/ParaView-5.11.1.sh b/products/compil_scripts/ParaView-5.11.1.sh index d0be771..6a67c6e 100755 --- a/products/compil_scripts/ParaView-5.11.1.sh +++ b/products/compil_scripts/ParaView-5.11.1.sh @@ -145,11 +145,13 @@ if [ -n "$SAT_HPC" ]; then exit 1 elif [ "${VTK_SMP_IMPLEMENTATION_TYPE}" == "OpenMP" ]; then echo "WARNING: VTK_SMP_IMPLEMENTATION_TYPE was set to: OpenMP..." - CMAKE_OPTIONS+=" -DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP -DVTKm_ENABLE_OPENMP:BOOL=ON" + CMAKE_OPTIONS+=" -DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP" elif [ "${VTK_SMP_IMPLEMENTATION_TYPE}" == "TBB" ]; then echo "WARNING: VTK_SMP_IMPLEMENTATION_TYPE was set to: TBB..." - CMAKE_OPTIONS+=" -DVTK_SMP_IMPLEMENTATION_TYPE=TBB -DVTKm_ENABLE_TBB:BOOL=ON" + CMAKE_OPTIONS+=" -DVTK_SMP_IMPLEMENTATION_TYPE=TBB" fi + CMAKE_OPTIONS+=" -DVTK_SMP_ENABLE_OPENMP:BOOL=ON -DVTK_SMP_ENABLE_STDTHREAD:BOOL=ON -DVTK_SMP_ENABLE_SEQUENTIAL:BOOL=ON" + CMAKE_OPTIONS+=" -DVTKm_ENABLE_TBB:BOOL=ON -DVTKm_ENABLE_OPENMP:BOOL=ON" CMAKE_OPTIONS+=" -DVTK_MODULE_ENABLE_VTK_FiltersParallelMPI=YES" CMAKE_OPTIONS+=" -DVTK_MODULE_ENABLE_VTK_ParallelMPI=YES" CMAKE_OPTIONS+=" -DMPI_C_FOUND=${MPI_C_FOUND}" @@ -166,14 +168,16 @@ elif [ "${VTK_SMP_IMPLEMENTATION_TYPE}" != "" ]; then CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=`which gcc`" elif [ "${VTK_SMP_IMPLEMENTATION_TYPE}" == "TBB" ]; then echo "WARNING: VTK_SMP_IMPLEMENTATION_TYPE was set to: TBB..." - CMAKE_OPTIONS+=" -DVTK_SMP_IMPLEMENTATION_TYPE=TBB -DVTKm_ENABLE_TBB:BOOL=ON" + CMAKE_OPTIONS+=" -DVTK_SMP_IMPLEMENTATION_TYPE=TBB" elif [ "${VTK_SMP_IMPLEMENTATION_TYPE}" == "OpenMP" ]; then echo "WARNING: VTK_SMP_IMPLEMENTATION_TYPE was set to: OpenMP..." - CMAKE_OPTIONS+=" -DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP -DVTKm_ENABLE_OPENMP:BOOL=ON" + CMAKE_OPTIONS+=" -DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP" else echo "ERROR: Unknown ${VTK_SMP_IMPLEMENTATION_TYPE} option.... aborting!" exit 1 fi + CMAKE_OPTIONS+=" -DVTK_SMP_ENABLE_OPENMP:BOOL=ON -DVTK_SMP_ENABLE_STDTHREAD:BOOL=ON -DVTK_SMP_ENABLE_SEQUENTIAL:BOOL=ON" + CMAKE_OPTIONS+=" -DVTKm_ENABLE_TBB:BOOL=ON -DVTKm_ENABLE_OPENMP:BOOL=ON" else echo "WARNING: MPI will not be supported!" CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=OFF" diff --git a/products/env_scripts/MeshGems.py b/products/env_scripts/MeshGems.py index 76a4f54..76e0731 100644 --- a/products/env_scripts/MeshGems.py +++ b/products/env_scripts/MeshGems.py @@ -69,7 +69,12 @@ def set_env(env, prereq_dir, version): # we don't need licence keys at compile time set_distene_licence(env) set_env_build(env, prereq_dir, version) - + # + M,m,p=map(str, version.replace('-','.').split('.')) + env.set('MESHGEMS_VERSION', version) + env.set('MESHGEMS_VERSION_MAJOR',M) + env.set('MESHGEMS_VERSION_MINOR',m) + env.set('MESHGEMS_VERSION_PATCH',p) def set_nativ_env(env): pass -- 2.39.2