Changeset 27145


Ignore:
Timestamp:
07/06/22 00:26:07 (3 years ago)
Author:
jdquinn
Message:

BUG: gmsh not found by gmshplanet in distributables (still need to update Python function)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.m

    r26361 r27145  
    1919        if s~=0,
    2020                error(r);
     21        elseif isempty(r),
     22                % If this function is called from one of our distributable packages, we
     23                % need to do a bit more to find the Gmsh executable
     24                [filepath,name,ext]=fileparts(which('gmsh.'));
     25                setenv('PATH',[filepath ':' getenv('PATH')])
     26                [s,r]=system(['gmsh -info 2>&1 | command grep ''Version'' | sed -e ''s/Version[[:blank:]]*:[[:blank:]]//'' | cut -d ''.'' -f1']);
     27                if s~=0,
     28                        error(r);
     29                elseif isempty(r),
     30                        error('gmshplanet: Gmsh executable not found!');
     31                end
    2132        end
    2233        gmshmajorversion=str2num(r);
Note: See TracChangeset for help on using the changeset viewer.