[Gmsh] Compile Gmsh with OCC support

D. Barbier bouzim at gmail.com
Wed Sep 7 08:36:30 CEST 2011


On 2011/9/7 Mikhail Artemiev wrote:
> Hi all!
> I know that this issue was raising many times. But I really can't activate
> OpenCascade support under Ubuntu and Suse Linux when I build Gmsh 2.5.0 and
> 2.4.2 from sources. I was trying this trick
> (http://www.geuz.org/pipermail/gmsh/2010/005211.html), i.e.
> cmake -DCMAKE_PREFIX_PATH:string="/home/artemiev/OCCT/" ..
> (where OCCT is a directory with OpenCascade files - sources and libraries).
> I tried also (as saing in README.txt)
> cmake -DCMAKE_PREFIX_PATH=/home/artemiev/OCCT/ ..
> Of course, I have ENABLE_OCC=1.
> However Gmsh doesn't have OCC support.
> Is there other way to activate OpenCascade support?

Hello,

This is possible, Ubuntu packages do have OpenCascade support.  If you
compiled OpenCascade yourself, and if you set CASROOT environment
variable to /home/artemiev/OCCT/, everything should work.

BTW I believe that it has not yet been reported here, but several
users started a fork of OpenCascade to fix some problems which were
not dealt with by developers, and one of our first achievements has
been to replace build systems by CMake.  Hopefully integration between
gmsh and OpenCascade will be easier.
If you are interested, please have a look at https://github.com/tpaviot/oce
I will try to provide a patch against CMakeLists.txt in a few days.

Denis