]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #32377: detect embedded cgns for GMSH build if cgns is embedded otherwise will...
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 6 Dec 2022 16:19:01 +0000 (17:19 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 6 Dec 2022 16:19:01 +0000 (17:19 +0100)
products/compil_scripts/gmsh-4.10.3.sh
products/env_scripts/cgns.py
products/gmsh.pyconf

index 493d3a5f24c15cb6d06ad1904f5da250a8b4ff7b..2eacc2322eb8c1500f25edbe39ea572dc343823c 100755 (executable)
@@ -24,7 +24,15 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_ONELAB_METAMODEL=OFF"
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_PARSER=ON"
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_PETSC=OFF"
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_PRIVATE_API=ON"
-CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_CGNS=ON"
+if [ -n "$CGNS_ROOT_DIR" ]; then
+    CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_CGNS=ON"
+    if [ "${SAT_cgns_IS_NATIVE}" != "1" ]; then
+       CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCGNS_INCLUDE_DIR:PATH=${CGNS_ROOT_DIR}/include"
+       CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCGNS_LIBRARY:PATH=${CGNS_ROOT_DIR}/lib/libcgns.so"
+    fi
+else
+    CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_CGNS=OFF"
+fi
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_LIBDIR=${PRODUCT_INSTALL}/lib" # strangely on Ubuntu GMSH installs the .so in lib instead of lib/lib64 - so force to lib64
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_PREFIX_PATH=${LAPACK_ROOT_DIR};${HDF5_ROOT_DIR};${MEDFILE_ROOT_DIR};" # set path of third libraries to our associated internal products
 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_OPENMP=ON"     # get OpenMP based parallelism working
index 576d8f3b3edb717d89dd508ba786e3c2d4b96c8e..ecc65e0ef8b33f23d54bb9bb392d60add035406c 100644 (file)
@@ -4,6 +4,7 @@
 import os.path, platform
 
 def set_env(env, prereq_dir, version):
+  env.set('CGNS_ROOT', prereq_dir)
   env.set('CGNS_ROOT_DIR', prereq_dir)
   env.set('CGNS_INCLUDE_DIR',os.path.join(prereq_dir,'include'))
   env.prepend('PATH', os.path.join(prereq_dir, 'bin'))
index ce678ce08a43fbdd68c72f23395ec0307d3cf5eb..33b8c5f4513bc24501589968a7acc41316154682 100644 (file)
@@ -33,16 +33,19 @@ default_win:
 version_4_10_3:
 {
   compil_script : "gmsh-4.10.3.sh"
+  depend : ["CAS","lapack","hdf5","medfile", "cgns"]
 }
 
 version_4_10_3_win:
 {
   compil_script : "gmsh-4.10.3.bat"
   patches: ['gmsh-4.10.3-windows.patch']
+  depend : ["CAS","lapack","hdf5","medfile", "cgns"]
 }
 
 version_4_10_3_win_dbg:
 {
+  depend : ["CAS","lapack","hdf5","medfile", "cgns"]
   compil_script : "gmsh-4.10.3.bat"
   patches: ['gmsh-4.10.3-windows.patch']
   properties :